update
This commit is contained in:
parent
c526d8ae0d
commit
5d83656f2f
3 changed files with 12 additions and 2 deletions
|
|
@ -14,6 +14,8 @@ In server block:
|
||||||
```nginx
|
```nginx
|
||||||
server {
|
server {
|
||||||
# ...
|
# ...
|
||||||
|
include snippets/cert/mydomain.com.conf;
|
||||||
|
include kit/ssl/hsts.conf;
|
||||||
include kit/ssl/force.conf;
|
include kit/ssl/force.conf;
|
||||||
# ...
|
# ...
|
||||||
}
|
}
|
||||||
|
|
@ -39,3 +41,9 @@ server {
|
||||||
# ...
|
# ...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### SSL snippets
|
||||||
|
|
||||||
|
- `kit/ssl/security.conf`: TLS protocol and session resumption settings.
|
||||||
|
- `kit/ssl/hsts.conf`: HSTS header for HTTPS responses.
|
||||||
|
- `kit/ssl/force.conf`: Redirect HTTP requests to HTTPS.
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ server {
|
||||||
|
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
|
|
||||||
|
include snippets/cert/mydomain.com.conf;
|
||||||
|
include kit/ssl/hsts.conf;
|
||||||
include kit/redirect/to-primary-domain.conf;
|
include kit/redirect/to-primary-domain.conf;
|
||||||
include kit/ssl/force.conf;
|
include kit/ssl/force.conf;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,4 @@ if ($scheme = "https") {
|
||||||
set $hsts_header_value "max-age=31536000; includeSubDomains; preload";
|
set $hsts_header_value "max-age=31536000; includeSubDomains; preload";
|
||||||
}
|
}
|
||||||
|
|
||||||
add_header Strict-Transport-Security $hsts_header_value;
|
add_header Strict-Transport-Security $hsts_header_value always;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue