I might understand why there aren’t any Configuration Rules for URL Normalization settings here. However only zone-level URL Normalization settings did cause some trouble for us. We have some Workers that need to process the original (unnormalized) URLs. For example, some Workers require the untouched Request-URI
for authenticating requests. We can’t disable URL Normalization just for these Workers, it will cause more problems than it solves.
Requesting via the workers.dev
subdomain is a solution since it has URL Normalization disabled. However, we have Custom Domain needs.
So, I would like to ask if there is a way to retrieve the original (unnormalized) URLs in Workers? I’m looking for something similar to this:
export default {
async fetch(request, env, ctx) {
let normalizedURL = new URL(request.url); // The normalized URL
let requestURI = ctx.requestUri; // The untouched Request-URI
}
}