Added the LoosePort config.json setting.
This commit is contained in:
parent
8bfd5adbbb
commit
a7e396cbc2
|
@ -93,6 +93,7 @@ type config struct {
|
||||||
DisableJSAntispam bool
|
DisableJSAntispam bool
|
||||||
//LooseCSP bool
|
//LooseCSP bool
|
||||||
LooseHost bool
|
LooseHost bool
|
||||||
|
LoosePort bool
|
||||||
DisableServerPush bool
|
DisableServerPush bool
|
||||||
EnableCDNPush bool
|
EnableCDNPush bool
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,8 @@ DisableJSAntispam - This switch lets you disable the JS anti-spam feature. It ma
|
||||||
|
|
||||||
LooseHost - Disable host header checks in the router. May be useful when using a reverse-proxy like Nginx.
|
LooseHost - Disable host header checks in the router. May be useful when using a reverse-proxy like Nginx.
|
||||||
|
|
||||||
|
LoosePort - Disable port match checks in the router. May be useful when using a revere-proxy like Nginx.
|
||||||
|
|
||||||
DisableServerPush - This switch lets you disable the HTTP/2 server push feature.
|
DisableServerPush - This switch lets you disable the HTTP/2 server push feature.
|
||||||
|
|
||||||
EnableCDNPush - This switch lets you enable the HTTP/2 CDN Server Push feature. This operates by sending a Link header on every request and may also work with reverse-proxies like Nginx for doing HTTP/2 server pushes.
|
EnableCDNPush - This switch lets you enable the HTTP/2 CDN Server Push feature. This operates by sending a Link header on every request and may also work with reverse-proxies like Nginx for doing HTTP/2 server pushes.
|
||||||
|
|
|
@ -733,7 +733,7 @@ func (r *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: Reject requests from non-local IPs, if the site host is set to localhost or a localhost IP
|
// TODO: Reject requests from non-local IPs, if the site host is set to localhost or a localhost IP
|
||||||
if common.Site.PortInt != 80 && common.Site.PortInt != 443 && sport != common.Site.Port {
|
if !common.Config.LoosePort && common.Site.PortInt != 80 && common.Site.PortInt != 443 && sport != common.Site.Port {
|
||||||
malformedRequest(2)
|
malformedRequest(2)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -512,7 +512,7 @@ func (r *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: Reject requests from non-local IPs, if the site host is set to localhost or a localhost IP
|
// TODO: Reject requests from non-local IPs, if the site host is set to localhost or a localhost IP
|
||||||
if common.Site.PortInt != 80 && common.Site.PortInt != 443 && sport != common.Site.Port {
|
if !common.Config.LoosePort && common.Site.PortInt != 80 && common.Site.PortInt != 443 && sport != common.Site.Port {
|
||||||
malformedRequest(2)
|
malformedRequest(2)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue