twitterchiver/viewer: fix media serving
This commit is contained in:
parent
d91b1baebc
commit
27b1e70ac1
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ func main() {
|
||||||
fmt.Fprintf(rw, "<p>%s</p>", wrap)
|
fmt.Fprintf(rw, "<p>%s</p>", wrap)
|
||||||
}
|
}
|
||||||
|
|
||||||
authR.Handle("/media/{path}", http.StripPrefix("/media/", http.FileServer(http.Dir(*mediaDirectory))))
|
authR.PathPrefix("/media/").Handler(http.StripPrefix("/media/", http.FileServer(http.Dir(*mediaDirectory))))
|
||||||
authR.HandleFunc("/", func(rw http.ResponseWriter, r *http.Request) {
|
authR.HandleFunc("/", func(rw http.ResponseWriter, r *http.Request) {
|
||||||
ctx := r.Context()
|
ctx := r.Context()
|
||||||
user := userFromContext(ctx)
|
user := userFromContext(ctx)
|
||||||
|
|
Loading…
Reference in a new issue