Last active
August 13, 2022 16:02
-
-
Save discountry/a0d7d73dd8dec16254d3399d13a9e767 to your computer and use it in GitHub Desktop.
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
| addEventListener( | |
| "fetch", event => { | |
| let url = new URL(event.request.url); | |
| url.hostname = "your.domain.com"; | |
| url.protocol = "https"; | |
| let request = new Request(url, event.request); | |
| event.respondWith( | |
| fetch(request) | |
| ) | |
| } | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment