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
[@sentry/node] Error URL doesn't include port number in Express #1917
Comments
Feel free to introduce a PR for this change, will be more than happy to merge it :) |
Would it be an acceptable solution to always use |
Yes, as
However, we want to add port only if it's not a default (80 for https, 8000 for https). |
Regarding contributing: I forked the repository and followed the instructions in |
@DanielGibbsNZ Sorry, you need to run |
Closing the issue as a part of large repository cleanup, due to it being inactive and/or outdated. |
Package + Version
@sentry/node
: 4.6.2Description
The request URL (
event.request.url
) added by theSentry.Handlers.requestHandler
does not include the port. Looking at the source shows that it derives the URL from the hostname, which in Express is retrieved fromreq.hostname
(which doesn't contain the port) rather thanheaders.host
(which does).This can be seen by running an Express server on a non-default port (e.g. 8080) and performing an HTTP request to
https://example.com:8080/error
which causes an error. The error shown in Sentry shows the URL ashttps://example.com/error
.The text was updated successfully, but these errors were encountered: