Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions django-gunicorn-nginx/myapp/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.shortcuts import render


def index(request):
return render(request, "myapp/home.html")
4 changes: 2 additions & 2 deletions django-gunicorn-nginx/project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

# Additional header-related settings
SECURE_REFERRER_POLICY = "no-referrer-when-downgrade"
SECURE_REFERRER_POLICY = "strict-origin-when-cross-origin"

SECURE_HSTS_SECONDS = 31536000 # == 1 year; *USE A SMALL VALUE FOR TESTING!*
SECURE_HSTS_SECONDS = 2_592_000 # 30 days; *USE A SMALL VALUE FOR TESTING!*
SECURE_HSTS_PRELOAD = True
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
2 changes: 1 addition & 1 deletion django-gunicorn-nginx/requirements/prod.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
django==3.2.*
gunicorn==20.1.*
django-csp
django-csp==3.7
Loading