Skip to content

Commit

Permalink
Fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
reakaleek committed Nov 22, 2024
1 parent 0167a2a commit a0f5ec3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ func forwardRequest(target string, r *http.Request, ch chan *http.Response) {
ch <- nil
return
}
// Append the original request's path to the target URL
url.Path = r.URL.Path

// Create a new request with the same method and URL
req, err := http.NewRequest(r.Method, url.String(), bytes.NewBuffer(bodyBytes)) // Use the copied body here
Expand Down

0 comments on commit a0f5ec3

Please sign in to comment.