mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 18:31:00 +00:00
fixed rice issue again
This commit is contained in:
parent
c7c3300350
commit
66cf15d2d9
1 changed files with 4 additions and 1 deletions
|
@ -127,8 +127,11 @@ func main() {
|
||||||
// create handler for static resources
|
// create handler for static resources
|
||||||
assetserve := http.FileServer(rice.MustFindBox("app").HTTPBox())
|
assetserve := http.FileServer(rice.MustFindBox("app").HTTPBox())
|
||||||
http.Handle("/robots.txt", assetserve)
|
http.Handle("/robots.txt", assetserve)
|
||||||
http.Handle("/", assetserve)
|
|
||||||
http.Handle("/static/", http.StripPrefix("/static", assetserve))
|
http.Handle("/static/", http.StripPrefix("/static", assetserve))
|
||||||
|
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
r.URL.Path = "/"
|
||||||
|
assetserve.ServeHTTP(w, r)
|
||||||
|
})
|
||||||
|
|
||||||
// create the router and add middleware
|
// create the router and add middleware
|
||||||
mux := router.New()
|
mux := router.New()
|
||||||
|
|
Loading…
Reference in a new issue