Skip to content

Commit

Permalink
Merge pull request #18 from deligianp/main
Browse files Browse the repository at this point in the history
Set up configurability for CORS origins
  • Loading branch information
deligianp authored Sep 10, 2024
2 parents 7d37e43 + ab98808 commit 2887655
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions schema-api/config/environments/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,5 @@
}
LOGGING['loggers']['']['handlers'].extend(['file', 'error-file'])
LOGGING['loggers']['django']['handlers'].extend(['file', 'error-file'])

CORS_ALLOW_ALL_ORIGINS = env.bool('CORS_ALLOW_ALL_ORIGINS', True)
3 changes: 3 additions & 0 deletions schema-api/config/environments/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,6 @@
'anon': '10/minute',
'user': '20/minute',
}

CORS_ALLOW_ALL_ORIGINS = env.bool('CORS_ALLOW_ALL_ORIGINS', False)
CORS_ALLOWED_ORIGINS = env.list('CORS_ALLOWED_ORIGINS', [])

0 comments on commit 2887655

Please sign in to comment.