mirror of https://github.com/gofiber/fiber.git
🩹 Fix: do not use require in http handlers
parent
3b3de52e66
commit
2ae87dd702
|
@ -1577,7 +1577,9 @@ func Test_CSRF_With_Proxy_Middleware(t *testing.T) {
|
||||||
targetServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
|
targetServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
_, err := w.Write([]byte("Hello from target"))
|
_, err := w.Write([]byte("Hello from target"))
|
||||||
require.NoError(t, err)
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
}))
|
}))
|
||||||
defer targetServer.Close()
|
defer targetServer.Close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue