v0.1.8 disable throttle by default to prevent confusion
This commit is contained in:
parent
92fe080833
commit
bc5743fa05
|
@ -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,
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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": {
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue