Files
zurg/internal/handlers/options.go
2024-01-09 16:53:12 +01:00

14 lines
275 B
Go

package handlers
import "net/http"
func (hs *Handlers) options(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Method == "OPTIONS" {
w.WriteHeader(http.StatusOK)
return
}
next.ServeHTTP(w, r)
})
}