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
// Configuration: define path prefixes and their target origins | |
const ROUTES = [ | |
{ prefix: '/docs', origin: 'https://<DOC URL>', strippedPrefix: false }, | |
{ prefix: '/blog', origin: 'https://<SOME BLOG URL>', strippedPrefix: false }, | |
{ prefix: '/home', origin: 'https://<WEBSITE>.com', strippedPrefix: true }, | |
{ prefix: '/', origin: 'https://<WEBSITE>.com', strippedPrefix: false }, // Default | |
]; | |
export default { | |
async fetch(request, env, ctx) { |