Skip to content

Commit d27fdb8

Browse files
Apply suggestions from code review
1 parent 83ce795 commit d27fdb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/nginx.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ in
7272
locations = lib.mkOption {
7373
type = with lib.types; attrsOf (submodule {
7474
options.extraConfig = lib.mkOption { };
75-
config.extraConfig = (if cfg.hstsHeader.enable then /* nginx */ ''
75+
config.extraConfig = lib.optionalString cfg.hstsHeader.enable /* nginx */ ''
7676
more_set_headers "Strict-Transport-Security: max-age=63072000; ${lib.optionalString cfg.hstsHeader.includeSubDomains "includeSubDomains; "}preload";
77-
'' else "") + cfg.commonServerConfig + cfgv.commonLocationsConfig;
77+
'' + cfg.commonServerConfig + cfgv.commonLocationsConfig;
7878
});
7979
};
8080
};

0 commit comments

Comments
 (0)