-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
62 additions
and
52 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
nix/modules/nixos/containers/traefik/middleware_secure-headers-jellyfin.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
containers.traefik.config.services.traefik.dynamicConfigOptions.http.middlewares.secure-headers-jellyfin = { | ||
headers = { | ||
sslRedirect = true; | ||
accessControlMaxAge = "100"; | ||
stsSeconds = "31536000"; # force browsers to only connect over https | ||
stsIncludeSubdomains = true; # force browsers to only connect over https | ||
stsPreload = true; # force browsers to only connect over https | ||
forceSTSHeader = true; # force browsers to only connect over https | ||
contentTypeNosniff = true; # sets x-content-type-options header value to "nosniff", reduces risk of drive-by downloads | ||
frameDeny = false; # sets x-frame-options header value to "deny", prevents attacker from spoofing website in order to fool users into clicking something that is not there | ||
browserXssFilter = true; # sets x-xss-protection header value to "1; mode=block", which prevents page from loading if detecting a cross-site scripting attack | ||
contentSecurityPolicy = [ | ||
# sets content-security-policy header to suggested value | ||
"default-src" | ||
"self" | ||
]; | ||
referrerPolicy = "same-origin"; | ||
addVaryHeader = true; | ||
customResponseHeaders = { | ||
X-Robots-Tag = "none,noarchive,nosnippet,notranslate,noimageindex"; | ||
server = ""; | ||
X-Forwarded-Proto = "https"; | ||
}; | ||
sslProxyHeaders = { | ||
X-Forwarded-Proto = "https"; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters