diff --git a/.gitignore b/.gitignore index ca55ab4f..1be6522f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .idea .vscode +.devcontainer cmd/interactsh-server/interactsh-server cmd/interactsh-client/interactsh-client diff --git a/pkg/server/http_server.go b/pkg/server/http_server.go index ed2535ad..e776352c 100644 --- a/pkg/server/http_server.go +++ b/pkg/server/http_server.go @@ -69,7 +69,7 @@ func NewHTTPServer(options *Options) (*HTTPServer, error) { } } router := &http.ServeMux{} - router.Handle("/", server.logger(http.HandlerFunc(server.defaultHandler))) + router.Handle("/", server.logger(server.corsMiddleware(http.HandlerFunc(server.defaultHandler)))) router.Handle("/register", server.corsMiddleware(server.authMiddleware(http.HandlerFunc(server.registerHandler)))) router.Handle("/deregister", server.corsMiddleware(server.authMiddleware(http.HandlerFunc(server.deregisterHandler)))) router.Handle("/poll", server.corsMiddleware(server.authMiddleware(http.HandlerFunc(server.pollHandler))))