feat: add Django settings and update Nginx server names for production domains
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 27s
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 27s
This commit is contained in:
parent
21160fec28
commit
dc5e79667a
2 changed files with 36 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name crmbackend.local;
|
||||
server_name betaapicsa.tradhox.com apicsa.tradhox.com crmbackend.local;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8081;
|
||||
|
|
|
|||
|
|
@ -127,4 +127,38 @@ REST_FRAMEWORK = {
|
|||
),
|
||||
}
|
||||
|
||||
CORS_ALLOW_ALL_ORIGINS = True # Admin WireGuard VPN only; safe for development
|
||||
CORS_ALLOW_ALL_ORIGINS = True
|
||||
CORS_ALLOW_CREDENTIALS = True
|
||||
|
||||
CORS_ALLOWED_ORIGINS = [
|
||||
'https://betacsa.tradhox.com',
|
||||
'https://csa.tradhox.com',
|
||||
'http://localhost:5173',
|
||||
'http://localhost:3000',
|
||||
]
|
||||
|
||||
CORS_ALLOWED_ORIGIN_REGEXES = [
|
||||
r"^https://.*\.tradhox\.com$",
|
||||
r"^http://localhost:\d+$",
|
||||
]
|
||||
|
||||
CORS_ALLOW_HEADERS = [
|
||||
'accept',
|
||||
'accept-encoding',
|
||||
'authorization',
|
||||
'content-type',
|
||||
'dnt',
|
||||
'origin',
|
||||
'user-agent',
|
||||
'x-csrftoken',
|
||||
'x-requested-with',
|
||||
]
|
||||
|
||||
CORS_ALLOW_METHODS = [
|
||||
'DELETE',
|
||||
'GET',
|
||||
'OPTIONS',
|
||||
'PATCH',
|
||||
'POST',
|
||||
'PUT',
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue