cmd/imageproxy: remove gorilla mux router

I'm not entirely sure why I had this in the first place... probably just
a misunderstanding at the time of what a mux did and when it is helpful.
In this case, it serves no purpose.
This commit is contained in:
Will Norris 2023-11-13 15:15:55 -08:00
parent da55ecefd3
commit ef50c1f9a6
3 changed files with 2 additions and 56 deletions

View file

@ -19,7 +19,6 @@ import (
"github.com/die-net/lrucache"
"github.com/die-net/lrucache/twotier"
"github.com/gomodule/redigo/redis"
"github.com/gorilla/mux"
"github.com/gregjones/httpcache/diskcache"
rediscache "github.com/gregjones/httpcache/redis"
"github.com/peterbourgon/diskv"
@ -89,12 +88,9 @@ func main() {
p.Verbose = *verbose
p.UserAgent = *userAgent
r := mux.NewRouter().SkipClean(true).UseEncodedPath()
r.PathPrefix("/").Handler(p)
server := &http.Server{
Addr: *addr,
Handler: r,
Handler: p,
ReadTimeout: 10 * time.Second,
WriteTimeout: 30 * time.Second,