refactor: remove forward auth, move module net/http to net/gphttp

This commit is contained in:
yusing
2025-03-28 07:03:35 +08:00
parent c0c6e21a16
commit 5d2df3550b
69 changed files with 321 additions and 745 deletions

View File

@@ -0,0 +1,20 @@
package middleware
import (
"net/http"
)
type modifyResponse struct {
ModifyRequestOpts
Tracer
}
var ModifyResponse = NewMiddleware[modifyResponse]()
// modifyResponse implements ResponseModifier.
func (mr *modifyResponse) modifyResponse(resp *http.Response) error {
mr.AddTraceResponse("before modify response", resp)
mr.modifyHeaders(resp.Request, resp, resp.Header)
mr.AddTraceResponse("after modify response", resp)
return nil
}