Skip to content

Fix url check error resulting in 400 when strategy is used in an Express router#72

Open
fchu wants to merge 1 commit into
jaredhanson:masterfrom
fchu:originalUrl-fix
Open

Fix url check error resulting in 400 when strategy is used in an Express router#72
fchu wants to merge 1 commit into
jaredhanson:masterfrom
fchu:originalUrl-fix

Conversation

@fchu

@fchu fchu commented Sep 25, 2017

Copy link
Copy Markdown

This happens because the Express router, changes the value of req.url to strip the mount point.
Using req.originalUrl should fix the issue ( Fixes #43 )
(see http://expressjs.com/en/4x/api.html#req.originalUrl for details)

@arihantdaga

Copy link
Copy Markdown

@jaredhanson i think we should merge this.. its causing error in digest auth and not giving any proper error message, but just bad request, it took me hours before finally digging down the code to later find that, that error was due to this...

@lkaybob

lkaybob commented Oct 15, 2018

Copy link
Copy Markdown

+1 on this PR. It also took me hours to debug

@beaulac

beaulac commented Jan 30, 2020

Copy link
Copy Markdown

This is a duplicate of #49 – either solution works, it would be nice to merge one of them though :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When express app is mounted at non-root endpoint, passport-http returns 400

4 participants