fix: drop Notion telemetry in the browser instead of fake responses#56
Open
erichurkman wants to merge 2 commits into
Open
fix: drop Notion telemetry in the browser instead of fake responses#56erichurkman wants to merge 2 commits into
erichurkman wants to merge 2 commits into
Conversation
…the proxy Notion fires fire-and-forget telemetry/analytics to notion.so, splunkcloud.com, and statsigapi.net (plus a same-origin /api/v3/ping keepalive). Previously these were rewritten to a same-origin /200/ pseudo endpoint, so every one produced a noisy 200 log line at the proxy even though the response was discarded. Suppress them entirely in the browser: window.fetch resolves a synthetic 200 with no network call, and XMLHttpRequest.open is redirected to a data: URL. No request leaves the browser, nothing reaches the proxy, and the page is unaffected since these responses were already thrown away. Co-Authored-By: Claude Opus 4.8 <[email protected]>
file.notion.so and file.notion.com serve signed PDF and attachment downloads. These are real content, not telemetry, but the blanket notion.so suppression rule would drop them and leave react-pdf (and any other attachment fetch) with an empty body, so the in-page PDF viewer renders nothing. Exempt these two hosts from suppression before the notion.so check. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notion fires telemetry/analytics to notion.so, splunkcloud.com, and statsigapi.net (plus a same-origin /api/v3/ping keepalive). Previously these were rewritten to a same-origin /200/ pseudo endpoint, so every one produced a noisy 200 log line at the proxy even though the response was discarded.
Suppress them entirely in the browser: window.fetch resolves a synthetic 200 with no network call, and XMLHttpRequest.open is redirected to a data: URL. No end user behavior change and Notion hosted pages don't seem to need a keepalive anyway.
This mostly solves a personal annoyance in useless telemetry messages that just get dropped anyway.