remoção de arquivos desnecessários
This commit is contained in:
@@ -14,7 +14,6 @@ class LogIPMiddleware:
|
||||
ip = self.get_client_ip(request)
|
||||
|
||||
# Loga o IP da requisição
|
||||
print(f"Request from IP: {ip}")
|
||||
logger.info(f"Request from IP: {ip} - Method: {request.method} - Path: {request.path}")
|
||||
|
||||
response = self.get_response(request)
|
||||
|
||||
@@ -170,7 +170,10 @@ STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
# CSRF e segurança
|
||||
CSRF_TRUSTED_ORIGINS = os.getenv('CSRF_TRUSTED_ORIGINS', 'http://localhost:8000,http://127.0.0.1:8000').split(',')
|
||||
CSRF_TRUSTED_ORIGINS = [origin.strip() for origin in os.getenv(
|
||||
'CSRF_TRUSTED_ORIGINS',
|
||||
'http://localhost:8000,http://127.0.0.1:8000'
|
||||
).split(',') if origin.strip()]
|
||||
SESSION_COOKIE_SECURE = not DEBUG
|
||||
CSRF_COOKIE_SECURE = not DEBUG
|
||||
SESSION_COOKIE_HTTPONLY = True
|
||||
|
||||
Reference in New Issue
Block a user