From 38bee54643294487f6b9e84c95ee9d2753066cf1 Mon Sep 17 00:00:00 2001 From: Jason Chu Date: Fri, 5 Jan 2024 19:59:51 +0000 Subject: [PATCH] trick traefik --- mini.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mini.go b/mini.go index a30a497..83a141e 100644 --- a/mini.go +++ b/mini.go @@ -119,8 +119,8 @@ func NewMini(config MiniConfig, next CaddyHandleFunc) (*Tmpauth, error) { } transport := &MiniTransport{ - base: http.DefaultTransport, - tmpauth: t, + RoundTripper: http.DefaultTransport, + tmpauth: t, } t.miniClient = &http.Client{ @@ -157,7 +157,7 @@ func (t *Tmpauth) ReauthMini() error { } type MiniTransport struct { - base http.RoundTripper + http.RoundTripper tmpauth *Tmpauth } @@ -181,7 +181,7 @@ func (t *MiniTransport) RoundTrip(req *http.Request) (*http.Response, error) { req.Body = io.NopCloser(bytes.NewReader(body)) - resp, err := t.base.RoundTrip(req) + resp, err := t.RoundTripper.RoundTrip(req) if resp.StatusCode == http.StatusPreconditionFailed { // our config ID is wrong err := t.tmpauth.ReauthMini()