Make nginx-proxy-http-version configurable per app or globally
This commit is contained in:
1 parent
8d696d1207
commit
4badd065cc
10 files changed
+102
-43
No files matched your search
@@ -436,6 +436,27 @@ func GlobalProxyBusyBuffersSize() string {
|
||||
return common.PropertyGet("nginx", "--global", "proxy-busy-buffers-size")
|
||||
}
|
||||
|
||||
func AppProxyHttpVersion(appName string) string {
|
||||
return common.PropertyGet("nginx", appName, "proxy-http-version")
|
||||
}
|
||||
|
||||
func ComputedProxyHttpVersion(appName string) string {
|
||||
appValue := AppProxyHttpVersion(appName)
|
||||
if appValue != "" {
|
||||
return appValue
|
||||
}
|
||||
|
||||
value := GlobalProxyHttpVersion()
|
||||
if value == "" {
|
||||
value = "1.1"
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
func GlobalProxyHttpVersion() string {
|
||||
return common.PropertyGet("nginx", "--global", "proxy-connect-timeout")
|
||||
}
|
||||
|
||||
func AppProxyConnectTimeout(appName string) string {
|
||||
return common.PropertyGet("nginx", appName, "proxy-connect-timeout")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user