mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
Merge pull request #759 from dafyk/patch-1
Set Content-Type for PAC and WPAD file
This commit is contained in:
commit
6dba5d2bb9
1 changed files with 3 additions and 0 deletions
|
@ -83,6 +83,9 @@ func (mod *HttpServer) Configure() error {
|
||||||
|
|
||||||
router.HandleFunc("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
router.HandleFunc("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
mod.Debug("%s %s %s%s", tui.Bold(strings.Split(r.RemoteAddr, ":")[0]), r.Method, r.Host, r.URL.Path)
|
mod.Debug("%s %s %s%s", tui.Bold(strings.Split(r.RemoteAddr, ":")[0]), r.Method, r.Host, r.URL.Path)
|
||||||
|
if r.URL.Path == "/proxy.pac" || r.URL.Path == "/wpad.dat" {
|
||||||
|
w.Header().Set("Content-Type", "application/x-ns-proxy-autoconfig")
|
||||||
|
}
|
||||||
fileServer.ServeHTTP(w, r)
|
fileServer.ServeHTTP(w, r)
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue