-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(core): Check fetch support with data URL
#18225
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Deno Referrer Policy URL Fix
The supportsReferrerPolicy function still uses new Request('_', ...) with an invalid URL, which will fail in Deno for the same reason the PR fixed in _isFetchSupported. Deno requires valid URLs for the Request constructor, so '_' needs to be changed to a valid URL like 'data:,' to maintain consistency with the fix.
packages/core/src/utils/supports.ts#L171-L172
sentry-javascript/packages/core/src/utils/supports.ts
Lines 171 to 172 in 432d9d7
| try { | |
| new Request('_', { |
size-limit report 📦
|
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
Lms24
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fix, thanks!
As Deno requires a valid URL when calling
new Request,example.comwas used but this caused problems.This PR changes it to a data URL as it does not rely on external dependencies and is a valid URL in Deno.
Fixes: #18218
Previous PR for that: #5630