mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-23 14:59:36 +02:00
Add ORIGIN environment variable and update startup script
This commit is contained in:
parent
40f8c72f19
commit
4c032445a7
3 changed files with 5 additions and 1 deletions
|
@ -5,6 +5,8 @@ services:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=postgres://adventurelog:PO24VjITwGgk@db:5432/adventurelog
|
- DATABASE_URL=postgres://adventurelog:PO24VjITwGgk@db:5432/adventurelog
|
||||||
|
# ORIGIN is only necessary when not using a reverse proxy or hosting that includes https
|
||||||
|
- ORIGIN=http://localhost:3000
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
db:
|
db:
|
||||||
|
|
|
@ -23,5 +23,6 @@ npm run generate
|
||||||
# Run database migration
|
# Run database migration
|
||||||
npm run migrate
|
npm run migrate
|
||||||
|
|
||||||
|
echo "The orgin to be set is: $ORIGIN"
|
||||||
# Start the application
|
# Start the application
|
||||||
node build/index.js
|
ORIGIN=$ORIGIN node build
|
||||||
|
|
|
@ -14,6 +14,7 @@ const config = {
|
||||||
preprocess: vitePreprocess(),
|
preprocess: vitePreprocess(),
|
||||||
kit: {
|
kit: {
|
||||||
adapter: adapter(),
|
adapter: adapter(),
|
||||||
|
csrf: { checkOrigin: true, }
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue