Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use req.originalUrl instead of req.url #8

Closed
wants to merge 1 commit into from

Conversation

andimeier
Copy link

(this is a fix to resolve issue #7)

because req.url can be overwritten, e.g. in case of hierarchical
sub-routers in node express. When using sub-routers (delegating routes to
child routers mounted at a specific mount point in the express app), the
sub-router will only receive the "sub-URL" which is the req.originalUrl,
with the mount point of the sub-router stripped off. So, for
cas-authentication redirects to work properly, req.originalUrl has to be
used throughout.

because req.url can be overwritten, e.g. in case of hierarchical
sub-routers in node express. When using sub-routers (delegating routes to
child routers mounted at a specific mount point in the express app), the
sub-router will only receive the "sub-URL" which is the req.originalUrl,
with the mount point of the sub-router stripped off. So, for
cas-authentication redirects to work properly, req.originalUrl has to be
used throughout.
@kayleecodes1
Copy link
Owner

I'm using req.originalUrl instead of req.url in the upcoming version of this package.

@jmaferreira
Copy link

Has this been released yet?

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.

3 participants