Skip to content

Commit

Permalink
Merge pull request #2069 from scpwiki/cross-origin
Browse files Browse the repository at this point in the history
Add setting to disable csrf on local
  • Loading branch information
emmiegit authored Sep 8, 2024
2 parents cd4d688 + e44e0cf commit 86c5b23
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion framerail/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ const config = {
preprocess: preprocess(),

kit: {
adapter: adapter()
adapter: adapter(),
csrf: {
// Allow flexible hosts on local, since we don't have real DNS
checkOrigin: process.env.FRAMERAIL_ENV !== "local"
}
},

compilerOptions: {
Expand Down
2 changes: 1 addition & 1 deletion install/aws/prod/docker/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN \
# Run command
USER node:node
ENV NODE_ENV=production
ENV PORT=3000
ENV FRAMERAIL_ENV=prod
EXPOSE 3000

CMD ["/usr/local/bin/node", "build"]
1 change: 1 addition & 0 deletions install/dev/digitalocean/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN \
# Run command
USER node:node
ENV NODE_ENV=production
ENV FRAMERAIL_ENV=dev
ENV PORT=3000
EXPOSE 3000

Expand Down
1 change: 1 addition & 0 deletions install/local/dev/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ WORKDIR /app
RUN pnpm install

EXPOSE 3000
ENV FRAMERAIL_ENV=local
CMD ["pnpm", "dev"]

0 comments on commit 86c5b23

Please sign in to comment.