Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
Properly check for HTTPS protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneWerner87 committed Nov 11, 2022
1 parent 69a0973 commit 95fc13b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func New(config ...Config) fiber.Handler {
if cfg.XFrameOptions != "" {
c.Set(fiber.HeaderXFrameOptions, cfg.XFrameOptions)
}
if c.Secure() && cfg.HSTSMaxAge != 0 {
if c.Protocol() == "https" && cfg.HSTSMaxAge != 0 {
subdomains := ""
if !cfg.HSTSExcludeSubdomains {
subdomains = "; includeSubDomains"
Expand Down

0 comments on commit 95fc13b

Please sign in to comment.