Skip to content

Commit

Permalink
Fix: Added Frontend Origin in CORS whitelist (bsoc-bitbyte#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 committed Jan 26, 2024
1 parent 6d1f5f2 commit ca51acf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/core/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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 ca51acf

Please sign in to comment.