only modify certain requests
This commit is contained in:
@@ -70,7 +70,9 @@ func createProxy(target *url.URL) func(http.ResponseWriter, *http.Request) {
|
|||||||
|
|
||||||
proxy := httputil.NewSingleHostReverseProxy(target)
|
proxy := httputil.NewSingleHostReverseProxy(target)
|
||||||
proxy.Director = director
|
proxy.Director = director
|
||||||
proxy.ModifyResponse = modifyResponse
|
if r.URL.Path == "/api/generate" {
|
||||||
|
proxy.ModifyResponse = modifyResponse
|
||||||
|
}
|
||||||
|
|
||||||
proxy.ServeHTTP(w, r)
|
proxy.ServeHTTP(w, r)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user