Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Overriding Host header in devtools module
Browse files Browse the repository at this point in the history
  • Loading branch information
vania-pooh committed Jun 24, 2019
1 parent 24d9c5f commit 609add3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions selenium/chrome/devtools/devtools.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func proxyWebSocket(w http.ResponseWriter, r *http.Request, u *url.URL) {
u.Scheme = "http"
(&httputil.ReverseProxy{
Director: func(r *http.Request) {
r.Host = "localhost"
r.URL = u
},
}).ServeHTTP(w, r)
Expand Down Expand Up @@ -78,6 +79,7 @@ func protocol(w http.ResponseWriter, r *http.Request) {
log.Printf("[PROTOCOL] [%s]", u.String())
(&httputil.ReverseProxy{
Director: func(r *http.Request) {
r.Host = "localhost"
r.URL = u
},
}).ServeHTTP(w, r)
Expand Down

0 comments on commit 609add3

Please sign in to comment.