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

Commit

Permalink
Merge pull request #165 from vania-pooh/master
Browse files Browse the repository at this point in the history
Overriding Host header in devtools module
  • Loading branch information
vania-pooh authored Jun 24, 2019
2 parents 24d9c5f + 609add3 commit 022350e
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 022350e

Please sign in to comment.