Skip to content
Snippets Groups Projects
Commit 87bb6e95 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixed URLs

parent 2860406a
Branches
Tags
No related merge requests found
...@@ -315,6 +315,7 @@ func main() { ...@@ -315,6 +315,7 @@ func main() {
http.Handle("/assets/", http.StripPrefix("/assets/", assetServer)) http.Handle("/assets/", http.StripPrefix("/assets/", assetServer))
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == "/" {
user := parseUser(r) user := parseUser(r)
type IndexData struct { type IndexData struct {
...@@ -326,8 +327,11 @@ func main() { ...@@ -326,8 +327,11 @@ func main() {
}); err != nil { }); err != nil {
panic(err) panic(err)
} }
} else {
imageServer.ServeHTTP(w, r)
}
}) })
http.Handle("/", imageServer) http.Handle("/i/", http.StripPrefix("/i/", imageServer))
err = http.ListenAndServe(":8080", nil) err = http.ListenAndServe(":8080", nil)
if err != nil { if err != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment