Skip to content

Commit

Permalink
Fix: Added Frontend Origin in CORS whitelist (#114)
Browse files Browse the repository at this point in the history
* fix:cors

* added frontend origin

* added deploy-previews to cors whitelist

---------

Co-authored-by: Armin Patel <[email protected]>
  • Loading branch information
ChaudharyRaman and arminpatel authored Jan 26, 2024
1 parent d2414bc commit b7ae850
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
# ALLOWED_HOSTS = os.environ.get('DJANGO_ALLOWED_HOSTS').split(' ')

CORS_ORIGIN_ALLOW_ALL = False
CORS_ORIGIN_WHITELIST = ['http://localhost:3000', ]
CORS_ORIGIN_WHITELIST = ['http://localhost:3000',
'https://merch-site.netlify.app',
'https://deploy-preview-*--merch-site.netlify.app'
]

# Application definition

Expand Down

0 comments on commit b7ae850

Please sign in to comment.