mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-28 16:37:24 +02:00
httputil/reproxy: fix policy transport (#3322)
This commit is contained in:
parent
a2d2f34e24
commit
6b663ba53f
2 changed files with 9 additions and 0 deletions
|
@ -37,6 +37,13 @@ func TestHTTPTransport(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestPolicyHTTPTransport(t *testing.T) {
|
||||
originalTransport := http.DefaultTransport
|
||||
defer func() {
|
||||
http.DefaultTransport = originalTransport
|
||||
}()
|
||||
src := NewStaticSource(&Config{Options: &Options{}})
|
||||
http.DefaultTransport = NewHTTPTransport(src)
|
||||
|
||||
s := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue