-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
HTTP hijacking (for Node WS/CONNECT, etc...) #12718
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
how about something service-worker ish implementation? /** @param {FetchEvent} evt */
function handleFetch (evt) {
const { request, respondWith } = evt
respondWith( new Response(...) )
}
globalThis.onfetch = handleFetch |
@jimmywarting is |
I dont see how that is relevant to this issue. that is just the fetch event that we have on deploy, it has nothing to do with this |
then i must have misinterpreted what the issue is about, i tough it was to hijack/intercept a ongoing request eg: making a fetch call to get something would trigger a fetch event that you could use to monitor/log all outgoing request. (unless that's what PerformanceEventTiming will be for, but a fetch event could for higher level stuff globalThis.onfetch = evt => {
// hijiack the request and respond with mocked data instead
}
fetch('https://httpbin.org/get') // would trigger a fetch event |
Ah, no this is something completely different, though the issue name is not great and there isnt a description, so cant blame you. |
No description provided.
The text was updated successfully, but these errors were encountered: