diff --git a/main.go b/main.go index eee79eda..a9561f88 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,6 @@ import ( "github.com/arrikto/oidc-authservice/common" "github.com/arrikto/oidc-authservice/oidc" - "github.com/gorilla/handlers" "github.com/gorilla/mux" "github.com/patrickmn/go-cache" log "github.com/sirupsen/logrus" @@ -81,7 +80,7 @@ func main() { log.Infof("Starting judge server at %v:%v", c.Hostname, c.Port) stopCh := make(chan struct{}) go func(stopCh chan struct{}) { - log.Fatal(http.ListenAndServe(fmt.Sprintf("%s:%d", c.Hostname, c.Port), handlers.CORS()(router))) + log.Fatal(http.ListenAndServe(fmt.Sprintf("%s:%d", c.Hostname, c.Port), router)) close(stopCh) }(stopCh) diff --git a/web_server.go b/web_server.go index 774bd3d6..9eb1a79e 100644 --- a/web_server.go +++ b/web_server.go @@ -8,7 +8,6 @@ import ( "strings" "github.com/arrikto/oidc-authservice/common" - "github.com/gorilla/handlers" "github.com/gorilla/mux" ) @@ -18,7 +17,7 @@ const ( ) var ( - ThemesPath = "/site/themes" + ThemesPath = "/site/themes" ) type WebServer struct { @@ -83,7 +82,7 @@ func (s *WebServer) Start(addr string) error { ), ) - return http.ListenAndServe(addr, handlers.CORS()(router)) + return http.ListenAndServe(addr, router) } // siteHandler returns an http.HandlerFunc that serves a given template