kayleecodes1 / cas-authentication

A CAS authentication library designed to be used as middleware for an Express server.
MIT License
73 stars 77 forks source link

use req.originalUrl instead of req.url #8

Closed andimeier closed 7 years ago

andimeier commented 8 years ago

(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.

kayleecodes1 commented 7 years ago

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

jmaferreira commented 5 years ago

Has this been released yet?