Last active
July 31, 2024 12:06
-
-
Save joeydi/8ef745da228e076067c92f7de8751109 to your computer and use it in GitHub Desktop.
S3 Proxy Cloudflare Worker
This file contains 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
export default { | |
async fetch(request) { | |
let url = new URL(request.url) | |
url.hostname = 'storage.googleapis.com' | |
url.pathname = url.pathname.replace(new RegExp('^/assets'), '/mamava-web-assets') | |
return await fetch(url); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment