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.Director = director
|
||||
if r.URL.Path == "/api/generate" {
|
||||
proxy.ModifyResponse = modifyResponse
|
||||
}
|
||||
|
||||
proxy.ServeHTTP(w, r)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user