1
0
mirror of https://github.com/containous/traefik.git synced 2025-11-22 00:23:55 +03:00

Fix customerrors query url replacement

This commit is contained in:
Dorian Allen
2025-09-09 15:54:04 +08:00
committed by GitHub
parent e2282b1379
commit ff848c74f9
2 changed files with 12 additions and 1 deletions

View File

@@ -175,6 +175,10 @@ func TestHandler(t *testing.T) {
req := testhelpers.MustNewRequest(http.MethodGet, "http://localhost/test?foo=bar&baz=buz", nil)
// Client like browser and curl will issue a relative HTTP request, which not have a host and scheme in the URL. But the http.NewRequest will set them automatically.
req.URL.Host = ""
req.URL.Scheme = ""
recorder := httptest.NewRecorder()
errorPageHandler.ServeHTTP(recorder, req)