middleware helemt changes

This commit is contained in:
2025-03-21 13:00:31 +05:30
parent aa6ba87f4e
commit e6a8880fd3
4 changed files with 11 additions and 16 deletions

View File

@@ -6,13 +6,13 @@ import (
"net/http/httptest"
"testing"
"gitserver.in/patialtech/mux"
"code.patial.tech/go/mux"
)
func TestHelmet(t *testing.T) {
r := mux.NewRouter()
r.Use(Helmet(HelmetOption{}))
r.Get("/hello", func(writer http.ResponseWriter, request *http.Request) {
r.GET("/hello", func(writer http.ResponseWriter, request *http.Request) {
_, _ = writer.Write([]byte("hello there"))
})