refactor: fix computation test and remove the app-specific hsts value

The default for an app is empty, meaning it will fallback to the global value (which defaults to true). This will allow users to properly override the global value, regardless of what it is.
This commit is contained in:
Jose Diaz-Gonzalez
2021-01-23 15:49:40 -05:00
parent 8cc92680c5
commit 5cac43fe55
4 changed files with 34 additions and 16 deletions

View File

@@ -46,8 +46,8 @@ cmd-nginx-report-single() {
"--nginx-disable-custom-config: $(fn-plugin-property-get-default "nginx" "$APP" "disable-custom-config" "false")"
"--nginx-error-log-path: $(fn-nginx-error-log-path "$APP")"
"--nginx-global-hsts: $(fn-plugin-property-get-default "nginx" "--global" "hsts" "true")"
"--nginx-applied-hsts: $(fn-plugin-property-get-default "nginx" "$APP" "hsts" "$(fn-plugin-property-get-default "nginx" "--global" "hsts" "true")")"
"--nginx-hsts: $(fn-plugin-property-get-default "nginx" "$APP" "hsts" "true")"
"--nginx-computed-hsts: $(fn-nginx-hsts-is-enabled "$APP")"
"--nginx-hsts: $(fn-plugin-property-get-default "nginx" "$APP" "hsts" "")"
"--nginx-hsts-include-subdomains: $(fn-plugin-property-get-default "nginx" "$APP" "hsts-include-subdomains" "true")"
"--nginx-hsts-max-age: $(fn-plugin-property-get-default "nginx" "$APP" "hsts-max-age" "15724800")"
"--nginx-hsts-preload: $(fn-plugin-property-get-default "nginx" "$APP" "hsts-preload" "false")"