v0.1.8 disable throttle by default to prevent confusion

This commit is contained in:
Yann Stepienik 2023-04-01 20:45:38 +01:00
parent 92fe080833
commit bc5743fa05
4 changed files with 5 additions and 9 deletions

View file

@ -101,7 +101,7 @@ const ProxyManagement = () => {
UsePathPrefix: false, UsePathPrefix: false,
PathPrefix: '', PathPrefix: '',
Timeout: 30000, Timeout: 30000,
ThrottlePerMinute: 100, ThrottlePerMinute: 0,
CORSOrigin: '', CORSOrigin: '',
StripPathPrefix: false, StripPathPrefix: false,
AuthEnabled: false, AuthEnabled: false,

View file

@ -127,7 +127,7 @@ const ServeApps = () => {
UsePathPrefix: false, UsePathPrefix: false,
PathPrefix: '', PathPrefix: '',
Timeout: 30000, Timeout: 30000,
ThrottlePerMinute: 100, ThrottlePerMinute: 0,
CORSOrigin: '', CORSOrigin: '',
StripPathPrefix: false, StripPathPrefix: false,
AuthEnabled: false, AuthEnabled: false,

View file

@ -1,6 +1,6 @@
{ {
"name": "cosmos-server", "name": "cosmos-server",
"version": "0.1.7", "version": "0.1.8",
"description": "", "description": "",
"main": "test-server.js", "main": "test-server.js",
"bugs": { "bugs": {

View file

@ -71,14 +71,10 @@ func RouterGen(route utils.ProxyRouteConfig, router *mux.Router, destination htt
throttlePerMinute := route.ThrottlePerMinute throttlePerMinute := route.ThrottlePerMinute
if(throttlePerMinute == 0) {
throttlePerMinute = 300
}
throtthleTime := 1*time.Minute throtthleTime := 1*time.Minute
// lets do something better later // lets do something better later to disable throttle
if(throttlePerMinute == -1) { if(throttlePerMinute == 0) {
throttlePerMinute = 99999999 throttlePerMinute = 99999999
throtthleTime = 1*time.Second throtthleTime = 1*time.Second
} }