mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-15 10:05:21 +00:00
added cors Allow specific origins setting, unpublish article api, pagination in notification list
This commit is contained in:
@ -37,7 +37,17 @@ SECRET_KEY = os.getenv('SECRET_KEY')
|
||||
DEBUG = os.getenv('DEBUG')
|
||||
|
||||
# cors allow setting
|
||||
CORS_ORIGIN_ALLOW_ALL = True
|
||||
CORS_ORIGIN_ALLOW_ALL = False
|
||||
|
||||
# Allow specific origins
|
||||
CORS_ALLOWED_ORIGINS = [
|
||||
"https://dev-api.zodqaapp.com",
|
||||
"https://qa-api.zodqaapp.com",
|
||||
"https://stage-api.zodqaapp.com",
|
||||
# Add more trusted origins as needed
|
||||
]
|
||||
# if DEBUG:
|
||||
# CORS_ALLOWED_ORIGINS += ["http://localhost:3000"]
|
||||
|
||||
# allow all host
|
||||
ALLOWED_HOSTS = ['*']
|
||||
@ -53,7 +63,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
# Add Django rest frame work apps here
|
||||
# Add Django rest framework apps here
|
||||
'django_extensions',
|
||||
'storages',
|
||||
'drf_yasg',
|
||||
|
Reference in New Issue
Block a user