UrlNormalization
Source:
src/Cloudflare/UrlNormalization/UrlNormalization.ts
The URL normalization configuration of a Cloudflare zone
(/zones/{zone_id}/url_normalization) — a zone-scoped singleton
controlling how Cloudflare normalizes incoming URLs before rule matching
and before forwarding to the origin.
The setting always exists on every zone (with Cloudflare defaults
scope: "incoming", type: "cloudflare"), so reconcile adopts the
singleton and PUTs the desired { scope, type } only when the observed
configuration differs. Destroy issues the API’s true reset operation
(DELETE), returning the zone to Cloudflare defaults.
Managing URL normalization
Section titled “Managing URL normalization”Normalize URLs sent to the origin too
yield* Cloudflare.UrlNormalization.UrlNormalization("UrlNormalization", { zoneId: zone.zoneId, scope: "both",});Strict RFC 3986 normalization
yield* Cloudflare.UrlNormalization.UrlNormalization("UrlNormalization", { zoneId: zone.zoneId, scope: "incoming", type: "rfc3986",});Disable URL normalization
yield* Cloudflare.UrlNormalization.UrlNormalization("UrlNormalization", { zoneId: zone.zoneId, scope: "none",});