cmd/godoc: serve proxy paths without host enforcer
Change-Id: I4647c1e18df3ea441c5220cd03fe6163794b7e84 Reviewed-on: https://go-review.googlesource.com/14862 Reviewed-by: Chris Broadfoot <cbro@golang.org>
This commit is contained in:
parent
e83bc56334
commit
c206e42859
|
@ -12,6 +12,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"archive/zip"
|
"archive/zip"
|
||||||
"log"
|
"log"
|
||||||
|
"net/http"
|
||||||
"path"
|
"path"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
||||||
|
@ -67,10 +68,15 @@ func init() {
|
||||||
pres.NotesRx = regexp.MustCompile("BUG")
|
pres.NotesRx = regexp.MustCompile("BUG")
|
||||||
|
|
||||||
readTemplates(pres, true)
|
readTemplates(pres, true)
|
||||||
|
|
||||||
mux := registerHandlers(pres)
|
mux := registerHandlers(pres)
|
||||||
dl.RegisterHandlers(mux)
|
dl.RegisterHandlers(mux)
|
||||||
proxy.RegisterHandlers(mux)
|
|
||||||
short.RegisterHandlers(mux)
|
short.RegisterHandlers(mux)
|
||||||
|
|
||||||
|
// Register /compile and /share handlers against the default serve mux
|
||||||
|
// so that other app modules can make plain HTTP requests to those
|
||||||
|
// hosts. (For reasons, HTTPS communication between modules is broken.)
|
||||||
|
proxy.RegisterHandlers(http.DefaultServeMux)
|
||||||
|
|
||||||
log.Println("godoc initialization complete")
|
log.Println("godoc initialization complete")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue