Merge branch v2.11 into v3.0

This commit is contained in:
Fernandez Ludovic 2024-04-03 17:44:16 +02:00
commit 9f145dbc28
130 changed files with 245 additions and 322 deletions

View file

@ -39,7 +39,7 @@ func Append(router *mux.Router, customAssets fs.FS) {
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
w.Header().Del("Content-Type")
http.StripPrefix("/dashboard/", http.FileServer(http.FS(assets))).ServeHTTP(w, r)
http.StripPrefix("/dashboard/", http.FileServerFS(assets)).ServeHTTP(w, r)
})
}
@ -56,7 +56,7 @@ func (g Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
w.Header().Del("Content-Type")
http.FileServer(http.FS(assets)).ServeHTTP(w, r)
http.FileServerFS(assets).ServeHTTP(w, r)
}
func safePrefix(req *http.Request) string {

View file

@ -42,7 +42,6 @@ func Test_safePrefix(t *testing.T) {
}
for _, test := range testCases {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()
@ -91,7 +90,6 @@ func Test_ContentSecurityPolicy(t *testing.T) {
}
for _, test := range testCases {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

View file

@ -210,7 +210,6 @@ func TestHandler_EntryPoints(t *testing.T) {
}
for _, test := range testCases {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

View file

@ -998,7 +998,6 @@ func TestHandler_HTTP(t *testing.T) {
}
for _, test := range testCases {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

View file

@ -269,7 +269,6 @@ func TestHandler_Overview(t *testing.T) {
}
for _, test := range testCases {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

View file

@ -874,7 +874,6 @@ func TestHandler_TCP(t *testing.T) {
}
for _, test := range testCases {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

View file

@ -127,7 +127,6 @@ func TestHandler_RawData(t *testing.T) {
}
for _, test := range testCases {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()
@ -252,7 +251,6 @@ func TestHandler_GetMiddleware(t *testing.T) {
}
for _, test := range testCases {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

View file

@ -564,7 +564,6 @@ func TestHandler_UDP(t *testing.T) {
}
for _, test := range testCases {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()

View file

@ -828,7 +828,6 @@ func TestSortRouters(t *testing.T) {
},
}
for _, test := range testCases {
test := test
t.Run(fmt.Sprintf("%s-%s", test.direction, test.sortBy), func(t *testing.T) {
t.Parallel()
@ -1339,7 +1338,6 @@ func TestSortServices(t *testing.T) {
},
}
for _, test := range testCases {
test := test
t.Run(fmt.Sprintf("%s-%s", test.direction, test.sortBy), func(t *testing.T) {
t.Parallel()
@ -1674,7 +1672,6 @@ func TestSortMiddlewares(t *testing.T) {
},
}
for _, test := range testCases {
test := test
t.Run(fmt.Sprintf("%s-%s", test.direction, test.sortBy), func(t *testing.T) {
t.Parallel()