You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Requests through a TLS-terminating proxy are seen as plain HTTP from the proxy's address #619
Behind a reverse proxy that terminates TLS and forwards to the HTTP port (server.api.allowhttp = true), the engine can't tell the original request was HTTPS or who the client was. Only the HTTPS connector has a SecureRequestCustomizer, and nothing reads X-Forwarded-Proto, X-Forwarded-For or Forwarded. So for these requests:
Jetty's ForwardedRequestCustomizer reads these headers, but it trusts whoever connects. Turning it on as-is would let any direct client fake its scheme and address.
Proposal
Add server.api.trustedproxies: a comma-separated list of addresses, CIDR blocks or ranges, blank by default. When it's set, both connectors get a customizer that applies ForwardedRequestCustomizer only when the connection's peer address is in the list (Jetty's InetAddressSet). Blank keeps today's behavior.
Jetty uses the first X-Forwarded-For entry as the client address, so the proxy has to replace that header rather than append to it (nginx: proxy_set_header X-Forwarded-For $remote_addr;). The property comment would say so.
Activity