proxy: add idle timeout (#2319)

This commit is contained in:
wasaga 2021-07-02 10:29:53 -04:00 committed by GitHub
parent 2ceaae8e54
commit 134ca74ec9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 658 additions and 531 deletions

View file

@ -156,7 +156,9 @@ func Test_UpdateOptions(t *testing.T) {
allowWebSockets := testOptions(t)
allowWebSockets.Policies = []config.Policy{{To: toFoo, From: "http://bar.example", AllowWebsockets: true}}
customTimeout := testOptions(t)
customTimeout.Policies = []config.Policy{{To: toFoo, From: "http://bar.example", UpstreamTimeout: 10 * time.Second}}
ten := 10 * time.Second
customTimeout.Policies = []config.Policy{{To: toFoo, From: "http://bar.example", UpstreamTimeout: &ten}}
corsPreflight := testOptions(t)
corsPreflight.Policies = []config.Policy{{To: toFoo, From: "http://bar.example", CORSAllowPreflight: true}}
disableAuth := testOptions(t)