Skip to content

Commit

Permalink
Merge pull request #18 from digital-land/add-cors
Browse files Browse the repository at this point in the history
Add CORS flag to allow datasette calls from the browser
  • Loading branch information
cpcundill authored Oct 25, 2024
2 parents 0ea756f + 39dd0ea commit ce778bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
DATASETTE_PID=0

start_datasette() {
DATASETTE_SERVE_ARGS="-h 0.0.0.0 -p $PORT --setting sql_time_limit_ms 10000 --nolock --immutable=/mnt/datasets/digital-land.sqlite3 --immutable=/mnt/datasets/performance.sqlite3 "
DATASETTE_SERVE_ARGS="-h 0.0.0.0 -p $PORT --setting sql_time_limit_ms 10000 --nolock --cors --immutable=/mnt/datasets/digital-land.sqlite3 --immutable=/mnt/datasets/performance.sqlite3 "

for KEY in $(jq -rc 'keys[]' /mnt/datasets/inspect-data-all.json); do
DATASETTE_SERVE_ARGS+="--immutable=/mnt/datasets/$KEY.sqlite3 ";
Expand Down

0 comments on commit ce778bc

Please sign in to comment.