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
When reply.redirect() is called with a relative url, the resulting Location header is currently mapped to an absolute url. When coupled with a reverse proxy the hapi logic can result in an incorrect Location header.
Since the proposed https://tools.ietf.org/html/rfc7231#section-7.1.2 allows relative URI references and most agents seem to already support it, would it be possible to disable this rewriting somehow?
The text was updated successfully, but these errors were encountered:
Given the change in the HTTP 1.1 specification, I no longer see why we need to prefix locations at all. This is a relic from an early version of postmile when HTTP still required absolute URIs. The new specification doesn't even mention this old requirement anymore and all modern browsers support relative locations.
This code has been a huge pain in the ass so will gladly get rid of this crap and let people who want absolute URIs deal with them as they see fit with whatever rules they want. I am sure someone can write a fancy plugin that does this based on some fancy logic.
hueniverse
changed the title
Allow relative .redirect() response
Remove special handling of the HTTP Location header
Nov 7, 2014
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
lockbot
locked as resolved and limited conversation to collaborators
Jan 9, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
breaking changesChange that can breaking existing codefeatureNew functionality or improvement
When
reply.redirect()
is called with a relative url, the resultingLocation
header is currently mapped to an absolute url. When coupled with a reverse proxy the hapi logic can result in an incorrectLocation
header.Since the proposed https://tools.ietf.org/html/rfc7231#section-7.1.2 allows relative URI references and most agents seem to already support it, would it be possible to disable this rewriting somehow?
The text was updated successfully, but these errors were encountered: