Skip to content

Commit

Permalink
fix: the path includes the root directory
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanViast committed Oct 28, 2024
1 parent 89b9d30 commit 91860db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/filters/proxies/providerproxy/providerproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (m *ProviderProxy) ParsePayloadMethod(payload []byte) []string {
}

func (m *ProviderProxy) HandleRequest(req *httpprot.Request, providerUrl *url.URL) (forwardReq *http.Request, method []string, err error) {
if len(req.URL().Path) != 0 {
if len(req.URL().Path) != 0 && req.URL().Path != "/" {
providerUrl = providerUrl.JoinPath(req.URL().Path)
method = []string{req.URL().Path}
} else {
Expand Down

0 comments on commit 91860db

Please sign in to comment.