Skip to content

Commit

Permalink
fix: developer setup for non grok users
Browse files Browse the repository at this point in the history
Adds CORS_ORIGIN_WHITELIST to settings when debug is on, which fixes a CSRF verification error
  • Loading branch information
wizzah authored Jul 1, 2024
1 parent 3236003 commit c813448
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bookwyrm/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@
BASE_URL = f"{PROTOCOL}://{NETLOC}"
CSRF_TRUSTED_ORIGINS = [BASE_URL]

if DEBUG:
CORS_ORIGIN_WHITELIST = [BASE_URL]

USER_AGENT = f"BookWyrm (BookWyrm/{VERSION}; +{BASE_URL})"

# Storage
Expand Down

0 comments on commit c813448

Please sign in to comment.