req.host deprecated. use req.hostname
See original GitHub issue- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
- Provide a link to the affected event from your Sentry account
Package + Version
-
@sentry/browser
-
@sentry/node
-
raven-js
-
raven-node
(raven for node) - other:
Version:
5.18.0
Description
GMT express deprecated req.host: Use req.hostname instead at node_modules/@sentry/node/dist/handlers.js:95:36
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Express deprecation warning for `req.host` · Issue #96 - GitHub
very easy to fix - I swapped it locally but every time I install the package it throws this error again - please...
Read more >body parser and html depreceated - Stack Overflow
express deprecated req.host: Use req.hostname instead node_modules\body-parser\index.js:100:29. Please let me know what steps to take. body-parser.
Read more >Express.js req.hostname Property - GeeksforGeeks
The req.hostname property contains the hostname which is derived from the Host HTTP header. It basically returns the hostname which is being ...
Read more >req.host - Sails.js
This method is deprecated and will likely be removed or changed in an upcoming release. Instead, use req. hostname. The hostname of this...
Read more >expressjs: is it bad practice to use req.hostname for querying a ...
I'm thinking about using kubernetes and dockers containers to isolate version ... domainToken, host = req.hostname; req.params.token = host ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If that happens, it means that somehow
req.hostname
is not present, and it should. Most likely something is changing the shape ofreq
object prior to reaching our middleware. We cannot do anything at the stage of reading the data - https://github.com/getsentry/sentry-javascript/blob/380f483d06355635e98b7ded7ffef7c7780ff891/packages/utils/src/requestdata.ts#L244Closing the issue as a part of large repository cleanup, due to it being inactive and/or outdated. Please do not hesitate to ping me if it is still relevant, and I will happily reopen and work on it. Cheers!