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

expressFormat use originalUrl if available #71

Merged
merged 1 commit into from Apr 9, 2015

Conversation

floatingLomas
Copy link
Collaborator

When using nested routers in e.g. express, the router modifies req.url to only contain the router relevant url part. For that matter, when logging req.url, you wouldn't see the complete original url. Express adds req.originalUrl which contains the url that was called by the client. If this property is available, it should be used over req.url in the log format

NOTE: replaces @benkroeger's PR #57 which wouldn't merge because of silly changes

When using nested routers in e.g. express, the router modifies req.url to only contain the router relevant url part. For that matter, when logging req.url, you wouldn't see the complete original url. Express adds req.originalUrl which contains the url that was called by the client. If this property is available, it should be used over req.url in the log format
floatingLomas added a commit that referenced this pull request Apr 9, 2015
expressFormat use originalUrl if available
@floatingLomas floatingLomas merged commit 41cb954 into bithavoc:master Apr 9, 2015
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.

None yet

2 participants