Redirect rules are firing before workers, right?

Hi there,
Can I safely remove "html_handling": "force-trailing-slash" from a wrangler.jsonc if I configured redirect rule that forces trailing slashes?




My redirect rule:
(not ends_with(http.request.uri.path, "/") and 
http.request.uri.path ne "/" and 
not http.request.uri.path contains "." and 
not starts_with(http.request.uri.path, "/api/") and 
not starts_with(http.request.uri.path, "/cdn-cgi/") and 
not starts_with(http.request.uri.path, "/_astro/") and 
not starts_with(http.request.uri.path, "/_actions/") and 
not starts_with(http.request.uri.path, "/_server-islands/") and 
not starts_with(http.request.uri.path, "/_image/"))

Then dynamic redirect to concat(http.request.uri.path, "/") with 301 status code
Was this page helpful?