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:
Andrew Gerrand 2015-09-23 15:00:56 +10:00
parent e83bc56334
commit c206e42859
1 changed files with 7 additions and 1 deletions

View File

@ -12,6 +12,7 @@ package main
import (
"archive/zip"
"log"
"net/http"
"path"
"regexp"
@ -67,10 +68,15 @@ func init() {
pres.NotesRx = regexp.MustCompile("BUG")
readTemplates(pres, true)
mux := registerHandlers(pres)
dl.RegisterHandlers(mux)
proxy.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")
}