pomerium icon indicating copy to clipboard operation
pomerium copied to clipboard

http response code error

Open cfanbo opened this issue 2 years ago • 1 comments

What happened?

Request an invalid URL,response code 421

Header

Request URL: https://test.example.net:6443/testtest
Request Method: GET
Status Code: 421 Misdirected Request
Remote Address: 127.0.0.1:6443
Referrer Policy: strict-origin-when-cross-origin

Response

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
        <title>Error response</title>
    </head>
    <body>
        <h1>Error response</h1>
        <p>Error code: 404</p>
        <p>Message: File not found.</p>
        <p>Error code explanation: HTTPStatus.NOT_FOUND - Nothing matches the given URI.</p>
    </body>
</html>

What did you expect to happen?

response code 404

What's your config.yaml?

address: :6443
routes:
- allow_public_unauthenticated_access: true
  from: https://sl.putuozt.cn:6443
  pass_identity_headers: true
  to: http://127.0.0.1:8080

What's your environment like?

  • v0.18.0
  • ubuntu x64

What did you see in the logs?

{"level":"info","service":"envoy","upstream-cluster":"route-a5c05ab8f8100d40","method":"GET","authority":"test.example.net:6443","path":"/testtest","user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","referer":"","forwarded-for":"192.168.111.132","request-id":"2928cf38-e276-46a2-a3d8-c092e396c347","duration":18.541006,"size":469,"response-code":421,"response-code-details":"via_upstream","time":"2022-08-02T16:58:13+08:00","message":"http-request"}

Additional context

Add any other context about the problem here.

cfanbo avatar Aug 02 '22 09:08 cfanbo

Related:

  • https://github.com/pomerium/pomerium/issues/2150

desimone avatar Aug 08 '22 17:08 desimone

This is a result of https://github.com/pomerium/pomerium/pull/1739. I don't know how to fix it.

calebdoxsey avatar Aug 23 '22 19:08 calebdoxsey

This was fixed with https://github.com/pomerium/pomerium/pull/3596. We should no longer return 421s.

calebdoxsey avatar Sep 20 '22 20:09 calebdoxsey