2025-03-14 20:00:50 +07:00

20 lines
720 B
JavaScript

const WEB2_URL = "https://www.memedeck.xyz";
const APP_PATH = "/loginex:login-example:sortugdev.os";
self.addEventListener('fetch', event => {
event.request.url = "/lmao";
console.log(event.request.url, "modified?")
// Create a new Headers object based on the original request's headers
const modifiedHeaders = new Headers(event.request.headers);
// Add a custom header as an example modification
modifiedHeaders.append('X-Custom-Header', 'my-value');
// Create a modified request with the new headers
const modifiedRequest = new Request(event.request, {
headers: modifiedHeaders
});
// Respond with the result of fetching the modified request
event.respondWith(fetch(modifiedRequest));
});