mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-26 23:17:39 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6d31a7eaf |
No files matched your search
@@ -641,6 +641,20 @@ you're running two instances of paperless on the same host.
|
||||
|
||||
Defaults to `""`, which does not alter the cookie names.
|
||||
|
||||
#### [`PAPERLESS_COOKIE_SECURE=<bool>`](#PAPERLESS_COOKIE_SECURE) {#PAPERLESS_COOKIE_SECURE}
|
||||
|
||||
: Marks the session, CSRF and language cookies with the `Secure` attribute, so browsers only send them over HTTPS. This sets the Django settings [`SESSION_COOKIE_SECURE`](https://docs.djangoproject.com/en/stable/ref/settings/#session-cookie-secure), [`CSRF_COOKIE_SECURE`](https://docs.djangoproject.com/en/stable/ref/settings/#csrf-cookie-secure) and [`LANGUAGE_COOKIE_SECURE`](https://docs.djangoproject.com/en/stable/ref/settings/#language-cookie-secure) together.
|
||||
|
||||
Enable this if you access paperless exclusively over HTTPS, for example behind a reverse proxy which terminates TLS.
|
||||
|
||||
!!! warning
|
||||
|
||||
Browsers will not send `Secure` cookies over plain HTTP, so logging in over HTTP, for example directly via a LAN address which bypasses the reverse proxy, will fail. Some browsers make an exception for `localhost`.
|
||||
|
||||
After changing this, you may have to login again.
|
||||
|
||||
Defaults to `false`.
|
||||
|
||||
#### [`PAPERLESS_ENABLE_HTTP_REMOTE_USER=<bool>`](#PAPERLESS_ENABLE_HTTP_REMOTE_USER) {#PAPERLESS_ENABLE_HTTP_REMOTE_USER}
|
||||
|
||||
: Allows authentication via HTTP_REMOTE_USER which is used by some SSO
|
||||
|
||||
@@ -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