mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-10 02:43:37 +02:00
improved middleware variable subsititution
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
E "github.com/yusing/go-proxy/internal/error"
|
||||
)
|
||||
|
||||
@@ -14,7 +12,7 @@ func NewModifyResponse(optsRaw OptionsRaw) (*Middleware, E.Error) {
|
||||
mr := new(modifyResponse)
|
||||
mr.m = &Middleware{
|
||||
impl: mr,
|
||||
modifyResponse: func(resp *http.Response) error {
|
||||
modifyResponse: func(resp *Response) error {
|
||||
mr.m.AddTraceResponse("before modify response", resp)
|
||||
mr.modifyHeaders(resp.Request, resp, resp.Header)
|
||||
mr.m.AddTraceResponse("after modify response", resp)
|
||||
|
||||
Reference in New Issue
Block a user