fix nginx again
This commit is contained in:
parent
2e419d994c
commit
279424d86d
2 changed files with 5 additions and 1 deletions
|
@ -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,
|
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.
|
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
|
## Usage
|
||||||
The instructions are fairly self explanatory: clone the repository and launch the
|
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
|
project. Instructions on how to launch the project are listed below. All commands
|
||||||
|
|
|
@ -60,7 +60,7 @@ http {
|
||||||
|
|
||||||
sendfile off;
|
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 Strict-Transport-Security "max-age=31536000; includeSubDomains;";
|
||||||
}
|
}
|
||||||
add_header X-Content-Type-Options nosniff;
|
add_header X-Content-Type-Options nosniff;
|
||||||
|
|
Reference in a new issue