Add hsts config

This commit is contained in:
Ivan R. 2023-08-18 18:26:54 +05:00
parent fbf263a787
commit 49576420ff
No known key found for this signature in database
GPG key ID: 56C7BAAE859B302C

View file

@ -7,6 +7,15 @@
recommendedGzipSettings = true;
recommendedProxySettings = true;
commonHttpConfig = ''
# Add HSTS header with preloading to HTTPS requests.
# Adding this header to HTTP requests is discouraged
map $scheme $hsts_header {
https "max-age=31536000; includeSubdomains; preload";
}
add_header Strict-Transport-Security $hsts_header;
'';
virtualHosts = {
"nc.comfycamp.space" = {
useACMEHost = "comfycamp.space";