Add handling of static/ dir and URL parameters to server.go
static/ is required to load gerrit-theme.html. URL parameters are important so that ?p2 is respected for Polymer 2. Change-Id: I03dc6df95022ea3a13ed44b1903cdc5394772f32
This commit is contained in:
@@ -74,6 +74,7 @@ func main() {
|
||||
http.HandleFunc("/accounts/", handleProxy)
|
||||
http.HandleFunc("/config/", handleProxy)
|
||||
http.HandleFunc("/projects/", handleProxy)
|
||||
http.HandleFunc("/static/", handleProxy)
|
||||
http.HandleFunc("/accounts/self/detail", handleAccountDetail)
|
||||
|
||||
if len(*plugins) > 0 {
|
||||
@@ -103,6 +104,7 @@ func handleIndex(writer http.ResponseWriter, originalRequest *http.Request) {
|
||||
fakeRequest := &http.Request{
|
||||
URL: &url.URL{
|
||||
Path: "/",
|
||||
RawQuery: originalRequest.URL.RawQuery,
|
||||
},
|
||||
}
|
||||
handleProxy(writer, fakeRequest)
|
||||
|
||||
Reference in New Issue
Block a user