Skip to content

Commit fc2da5e

Browse files
jsb2092claude
andcommitted
Add CSRF_TRUSTED_ORIGINS for Railway
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f94d386 commit fc2da5e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

questionbank/config/settings.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,13 @@
131131
CORS_ALLOWED_ORIGINS = os.getenv('CORS_ORIGINS', 'http://localhost:3000,http://127.0.0.1:8000').split(',')
132132
CORS_ALLOW_ALL_ORIGINS = DEBUG
133133

134+
# CSRF trusted origins (required for Django 4.0+)
135+
CSRF_TRUSTED_ORIGINS = [
136+
'https://*.railway.app',
137+
'http://localhost:8000',
138+
'http://127.0.0.1:8000',
139+
]
140+
134141
# Authentication
135142
LOGIN_URL = '/login/'
136143
LOGIN_REDIRECT_URL = '/'

0 commit comments

Comments
 (0)