Skip to content

Commit

Permalink
root: fix system check warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu committed Jan 23, 2024
1 parent ff5d15b commit 9d1dbe4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
11 changes: 11 additions & 0 deletions authentik/root/settings.py
Expand Up @@ -453,6 +453,17 @@
"CELERY",
]

SILENCED_SYSTEM_CHECKS = [
# We use our own subclass of django.middleware.csrf.CsrfViewMiddleware
"security.W003",
# We don't set SESSION_COOKIE_SECURE since we use a custom SessionMiddleware subclass
"security.W010",
# HSTS: This is configured in reverse proxies/the go proxy, not in django
"security.W004",
# https redirect: This is configured in reverse proxies/the go proxy, not in django
"security.W008",
]


def _update_settings(app_path: str):
try:
Expand Down
4 changes: 0 additions & 4 deletions lifecycle/ak
Expand Up @@ -50,10 +50,6 @@ function set_mode {
trap cleanup EXIT
}

function run_django_checks {
python -m manage check --deploy
}

function cleanup {
rm -f ${MODE_FILE}
}
Expand Down
3 changes: 3 additions & 0 deletions lifecycle/migrate.py
Expand Up @@ -111,5 +111,8 @@ def release_lock(cursor: Cursor):
) from exc
execute_from_command_line(["", "migrate_schemas"])
execute_from_command_line(["", "migrate_schemas", "--schema", "template", "--tenant"])
execute_from_command_line(
["", "check"] + ([] if CONFIG.get_bool("debug") else ["--deploy"])
)
finally:
release_lock(curr)
2 changes: 2 additions & 0 deletions website/docs/installation/reverse-proxy.md
Expand Up @@ -48,6 +48,8 @@ server {
ssl_certificate /etc/letsencrypt/live/domain.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.tld/privkey.pem;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
# Proxy site
location / {
proxy_pass https://authentik;
Expand Down

0 comments on commit 9d1dbe4

Please sign in to comment.