patch CSRF and CI
Some checks failed
ERP CI/CD Pipeline / test (push) Has been cancelled
ERP CI/CD Pipeline / Deploy (server git pull + compose) (push) Has been cancelled

This commit is contained in:
mariomitte
2026-07-10 23:00:06 +02:00
parent 88de1a503a
commit 4c9b6bba96
4 changed files with 69 additions and 16 deletions

View File

@@ -23,6 +23,16 @@ CSRF_COOKIE_SECURE = True
# Produkcijski CORS (samo domena na kojoj vrti Astro)
CORS_ALLOWED_ORIGINS = os.environ.get('CORS_ALLOWED_ORIGINS', '').split(',')
# csrf trusted origins za produkciju (env + poznate domene)
CSRF_TRUSTED_ORIGINS = [
origin.strip()
for origin in os.environ.get('CSRF_TRUSTED_ORIGINS', '').split(',')
if origin.strip()
] + [
'https://api-004.captain.mitteworkspace.cloud',
'https://serviseri-004.captain.mitteworkspace.cloud',
]
# Statika i Mediji
STATIC_ROOT = '/app/staticfiles'
MEDIA_ROOT = '/app/media'