mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-12-06 19:21:55 +00:00
Feature: add PAPERLESS_COOKIE_SECURE to mark session, CSRF and language cookies Secure (#14886)
This commit is contained in:
1 parent
2b8697e850
commit
89f0037362
2 files changed
+21
No files matched your search
@@ -556,6 +556,13 @@ CSRF_COOKIE_NAME = f"{COOKIE_PREFIX}csrftoken"
|
||||
SESSION_COOKIE_NAME = f"{COOKIE_PREFIX}sessionid"
|
||||
LANGUAGE_COOKIE_NAME = f"{COOKIE_PREFIX}django_language"
|
||||
|
||||
# Mark the session, CSRF and language cookies as Secure, so browsers only send
|
||||
# them over HTTPS. Off by default, as it breaks any access over plain HTTP.
|
||||
COOKIE_SECURE = get_bool_from_env("PAPERLESS_COOKIE_SECURE", "false")
|
||||
SESSION_COOKIE_SECURE = COOKIE_SECURE
|
||||
CSRF_COOKIE_SECURE = COOKIE_SECURE
|
||||
LANGUAGE_COOKIE_SECURE = COOKIE_SECURE
|
||||
|
||||
EMAIL_CERTIFICATE_FILE = get_path_from_env("PAPERLESS_EMAIL_CERTIFICATE_LOCATION")
|
||||
EMAIL_ALLOW_INTERNAL_HOSTS = get_bool_from_env(
|
||||
"PAPERLESS_EMAIL_ALLOW_INTERNAL_HOSTS",
|
||||
|
||||
Reference in new issue
Block a user