feat: add support for setting underscores-in-headers for nginx, openresty, and k3s

Closes #6627
This commit is contained in:
Jose Diaz-Gonzalez
2024-02-27 11:23:23 -05:00
parent c2bc469d53
commit b99c25f090
13 changed files with 77 additions and 4 deletions

View File

@@ -298,6 +298,23 @@ func GlobalProxyReadTimeout() string {
return common.PropertyGetDefault("nginx", "--global", "proxy-read-timeout", "60s")
}
func AppUnderscoreInHeaders(appName string) string {
return common.PropertyGet("nginx", appName, "underscore-in-headers")
}
func ComputedUnderscoreInHeaders(appName string) string {
appValue := AppUnderscoreInHeaders(appName)
if appValue != "" {
return appValue
}
return GlobalUnderscoreInHeaders()
}
func GlobalUnderscoreInHeaders() string {
return common.PropertyGetDefault("nginx", "--global", "underscore-in-headers", "off")
}
func AppXForwardedForValue(appName string) string {
return common.PropertyGet("nginx", appName, "x-forwarded-for-value")
}