File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 1212
1313DEBUG = os .environ .get ('DEBUG' , 'False' ).lower () == 'true'
1414
15- ALLOWED_HOSTS = ['argus-ia.up.railway.app' , 'localhost' , '127.0.0.1' ]
15+ ALLOWED_HOSTS = [
16+ host .strip ()
17+ for host in os .environ .get ('ALLOWED_HOSTS' , 'localhost,127.0.0.1' ).split (',' )
18+ ]
19+
1620
1721INSTALLED_APPS = [
1822 'django.contrib.admin' ,
121125# Segurança em produção — NÃO aplicar no ambiente local
122126# Segurança em produção
123127if not DEBUG :
124- # Cookies seguros no ambiente de produção
125128 SESSION_COOKIE_SECURE = True
126129 CSRF_COOKIE_SECURE = True
127-
128- # Railway NÃO aceita redirecionamento SSL dentro do container
129130 SECURE_SSL_REDIRECT = False
130-
131- # HSTS pode ficar ativo
132- SECURE_HSTS_SECONDS = 31536000
133- SECURE_HSTS_INCLUDE_SUBDOMAINS = True
134- SECURE_HSTS_PRELOAD = True
131+ SECURE_HSTS_SECONDS = 0 # evitar bloqueios durante teste
135132else :
136- # Ambiente local
137133 SESSION_COOKIE_SECURE = False
138134 CSRF_COOKIE_SECURE = False
139135 SECURE_SSL_REDIRECT = False
140136
137+
141138PORT = os .environ .get ('PORT' , 8000 )
You can’t perform that action at this time.
0 commit comments