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

@@ -4,6 +4,18 @@ DEBUG = True
# ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'backend']
ALLOWED_HOSTS = ['*']
# CSRF trusted origins (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',
'http://localhost:4321',
'http://127.0.0.1:4321',
]
# SQLite za brzi lokalni razvoj (nema potrebe za instalacijom Postgresa na laptopu)
# DATABASES = {
# 'default': {