mirror of
https://github.com/sissbruecker/linkding.git
synced 2026-02-27 22:43:15 +08:00
Cleanup
This commit is contained in:
@@ -29,6 +29,13 @@ DEBUG = False
|
||||
|
||||
ALLOWED_HOSTS = ["*"]
|
||||
|
||||
USE_X_FORWARDED_HOST = os.getenv("LD_USE_X_FORWARDED_HOST", False) in (
|
||||
True,
|
||||
"True",
|
||||
"true",
|
||||
"1",
|
||||
)
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
@@ -217,16 +224,6 @@ if LD_ENABLE_AUTH_PROXY:
|
||||
if LD_AUTH_PROXY_LOGOUT_URL:
|
||||
LOGOUT_REDIRECT_URL = LD_AUTH_PROXY_LOGOUT_URL
|
||||
|
||||
LD_USE_X_FORWARDED_HOST = os.getenv("LD_USE_X_FORWARDED_HOST", False) in (
|
||||
True,
|
||||
"True",
|
||||
"true",
|
||||
"1",
|
||||
)
|
||||
|
||||
if LD_USE_X_FORWARDED_HOST:
|
||||
USE_X_FORWARDED_HOST = LD_USE_X_FORWARDED_HOST
|
||||
|
||||
# CSRF trusted origins
|
||||
trusted_origins = os.getenv("LD_CSRF_TRUSTED_ORIGINS", "")
|
||||
if trusted_origins:
|
||||
|
||||
@@ -200,7 +200,7 @@ Values: `true` or `false` | Default = `false`
|
||||
|
||||
If enabled the server will trust the `X-Forwarded-Host` header over the `Host` header to determine the hostname of the server. This should only be enabled if a proxy which sets this header is in use.
|
||||
|
||||
This setting is adopted from the Django framework used by linkding, more information on the setting is available in the [Django documentation](https://docs.djangoproject.com/en/6.0/ref/settings/#std-setting-USE_X_FORWARDED_HOST)
|
||||
This setting is adopted from the Django framework used by linkding, more information on the setting is available in the [Django documentation](https://docs.djangoproject.com/en/6.0/ref/settings/#std-setting-USE_X_FORWARDED_HOST).
|
||||
|
||||
### `LD_LOG_X_FORWARDED_FOR`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user