Add ORIGIN environment variable and update startup script
This commit is contained in:
@@ -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, }
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user