Skip to content

Commit

Permalink
Configure the SECURE_SSL_REDIRECT setting to True
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Feb 21, 2024
1 parent b654cfd commit d6a0bbd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tcms/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os
import pathlib
import sys
import tempfile
from importlib import import_module

Expand Down Expand Up @@ -198,6 +199,10 @@
# https://docs.djangoproject.com/en/4.2/ref/settings/#secure-content-type-nosniff
SECURE_CONTENT_TYPE_NOSNIFF = True

# Kiwi TCMS doesn't serve plain/text HTTP anymore
# https://docs.djangoproject.com/en/4.2/ref/settings/#secure-ssl-redirect
SECURE_SSL_REDIRECT = "runserver" not in sys.argv and "test" not in sys.argv

# See https://github.com/kiwitcms/Kiwi/issues/2717
# and tcms/issuetracker/azure_boards.py
AZURE_BOARDS_API_VERSION = os.environ.get("AZURE_BOARDS_API_VERSION", "6.0")
Expand Down

0 comments on commit d6a0bbd

Please sign in to comment.