Skip to content

Commit

Permalink
Merge pull request #26 from vortex14/proxy-server
Browse files Browse the repository at this point in the history
updated
  • Loading branch information
vortex14 authored Aug 19, 2022
2 parents bb6b383 + d3337f1 commit 552b19a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions extensions/pipelines/http/net-http/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"github.com/sirupsen/logrus"
"github.com/vortex14/gotyphoon/log"
"net/http"
"net/url"

Expand Down Expand Up @@ -122,6 +123,10 @@ func ConstructorProxyRequestSettingsMiddleware(required bool) interfaces.Middlew
} else if proxyURL.Host == "" || proxyURL.Port() == "" {
reject(Errors.ProxyTaskNotFound)
}

context = log.PatchCtx(context, map[string]interface{}{"proxy": task.GetProxyAddress()})
next(context)

},
}
}

0 comments on commit 552b19a

Please sign in to comment.