3.0.8 init

- Fixed rate limit bug  #216
- Added HSTS auto subdomain include check
This commit is contained in:
Toby Chui
2024-06-25 18:10:39 +08:00
parent a18413dd03
commit 7e62fef879
5 changed files with 39 additions and 6 deletions

View File

@@ -475,9 +475,12 @@ func ReverseProxyHandleEditEndpoint(w http.ResponseWriter, r *http.Request) {
utils.SendErrorResponse(w, "invalid rate limit number")
return
}
if proxyRateLimit <= 0 {
if requireRateLimit && proxyRateLimit <= 0 {
utils.SendErrorResponse(w, "rate limit number must be greater than 0")
return
}else if proxyRateLimit < 0 {
proxyRateLimit = 1000
}
// Bypass WebSocket Origin Check