File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed
Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 8585 ]
8686
8787
88+ SECURE_HSTS_SECONDS = 0
89+ SECURE_SSL_REDIRECT : bool = env .bool ("SECURE_SSL_REDIRECT" , False )
90+ SESSION_COOKIE_SECURE : bool = env .bool ("SESSION_COOKIE_SECURE" , True )
91+ CSRF_COOKIE_SECURE : bool = env .bool ("CSRF_COOKIE_SECURE" , True )
92+ CSRF_TRUSTED_ORIGINS : list [str ] = [f"https://{ host } " for host in ALLOWED_HOSTS ]
93+
94+ # Required for HTTP behind Traefik
95+ SECURE_PROXY_SSL_HEADER : tuple = ("HTTP_X_FORWARDED_PROTO" , "http" )
96+ USE_X_FORWARDED_HOST : bool = env .bool ("USE_X_FORWARDED_HOST" , True )
97+
98+
8899ROOT_URLCONF = "core.urls"
89100
90101TEMPLATES = [
Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ services:
1212 env_file :
1313 - ../envs/.env.docker-compose
1414 command : " ./entrypoint.sh"
15- ports :
16- - " 8000:8000"
1715 labels :
1816 - " traefik.enable=true"
1917
Original file line number Diff line number Diff line change 1- version : ' 3.9'
2-
31networks :
42 web :
53 external : true
@@ -8,8 +6,6 @@ services:
86 traefik :
97 image : traefik:v3.0
108 container_name : traefik
11- env_file :
12- - src/docker/.env.traefik
139 command :
1410 - " --api.dashboard=true"
1511 - " --providers.docker=true"
@@ -24,14 +20,15 @@ services:
2420 - " --entrypoints.web.http.redirections.entrypoint.scheme=https"
2521
2622 # Let's Encrypt
27- - " --certificatesresolvers.myresolver.acme.tlschallenge=true"
23+ - " --certificatesresolvers.myresolver.acme.httpchallenge=true"
24+ - " --certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
2825 - " --certificatesresolvers.myresolver.acme.email=admin@davidslusser.website"
2926 - " --certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
3027
3128 ports :
3229 - " 80:80"
3330 - " 443:443"
34- - " 8080:8080 "
31+ - " 8000:8000 "
3532
3633 volumes :
3734 - " /var/run/docker.sock:/var/run/docker.sock:ro"
You can’t perform that action at this time.
0 commit comments