diff options
Diffstat (limited to 'roseh.moe.go')
| -rw-r--r-- | roseh.moe.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/roseh.moe.go b/roseh.moe.go index f71761c..20c2101 100644 --- a/roseh.moe.go +++ b/roseh.moe.go @@ -855,8 +855,10 @@ func main() { mux.Handle("GET /code/", http.StripPrefix("/code/", http.FileServer(http.Dir(*codeDir)))) mux.HandleFunc("GET /static/", static) mux.HandleFunc("GET /favicon.ico", favicon) - mux.HandleFunc("PUT /api/wormhole/{name}", wormholeAPIUpload) - mux.HandleFunc("GET /", notFound) + apiMux := http.NewServeMux() + apiMux.HandleFunc("PUT /api/wormhole/{name}", wormholeAPIUpload) + mux.Handle("/api/", apiMux) + mux.HandleFunc("/", notFound) http.Handle("/", http.NewCrossOriginProtection().Handler(mux)) jellyfinURL, err := url.Parse("http://127.0.0.1:8096") if err != nil { |
