Skip to content

Commit fba6951

Browse files
committed
Secure session and crsf cookies
1 parent f2829fe commit fba6951

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

geonode/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -886,8 +886,8 @@
886886
# It must be placed after the SessionMiddleware
887887
MIDDLEWARE += ("geonode.security.middleware.AuthenticateBasicAuthOrApiKeyMiddleware",)
888888

889-
SESSION_COOKIE_SECURE = ast.literal_eval(os.environ.get("SESSION_COOKIE_SECURE", "False"))
890-
CSRF_COOKIE_SECURE = ast.literal_eval(os.environ.get("CSRF_COOKIE_SECURE", "False"))
889+
SESSION_COOKIE_SECURE = ast.literal_eval(os.environ.get("SESSION_COOKIE_SECURE", "True"))
890+
CSRF_COOKIE_SECURE = ast.literal_eval(os.environ.get("CSRF_COOKIE_SECURE", "True"))
891891
CSRF_COOKIE_HTTPONLY = ast.literal_eval(os.environ.get("CSRF_COOKIE_HTTPONLY", "False"))
892892
CORS_ALLOW_ALL_ORIGINS = ast.literal_eval(os.environ.get("CORS_ALLOW_ALL_ORIGINS", "False"))
893893
X_FRAME_OPTIONS = os.environ.get("X_FRAME_OPTIONS", "DENY")

0 commit comments

Comments
 (0)