diff --git a/README.md b/README.md index 2a1b14e..4abfa12 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,10 @@ that Nginx performs better than Caddy in handling requests. In addition to this, Nginx, while having a more complicated configuration file, doesn't enforce HTTPS, a feature of Caddy which only complicates the setup of the HTTP Docker container. +Also if the nginx receives a request from a reverse proxy, it will set the HSTS header +and redirect to HTTPS automatically. If you do not want this behaviour, adjust the `nginx.conf` +as you like. + ## Usage The instructions are fairly self explanatory: clone the repository and launch the project. Instructions on how to launch the project are listed below. All commands diff --git a/services/http/nginx.conf b/services/http/nginx.conf index d73bc1b..eb52bda 100644 --- a/services/http/nginx.conf +++ b/services/http/nginx.conf @@ -60,7 +60,7 @@ http { sendfile off; - if ($http_x_forwarded_proto == "https") { + if ($http_x_forwarded_proto = "https") { add_header Strict-Transport-Security "max-age=31536000; includeSubDomains;"; } add_header X-Content-Type-Options nosniff;