I’m wondering if (in a worker) it’s possible to detect and redirect the case where (for whatever weird reason) there are multiple trailing slashes on a base url.
I can successfully redirect:
mydomain.com/path/// -> mydomain.com/path
mydomain.com/path// -> mydomain.com/path
mydomain.com/path/ -> mydomain.com/path
mydomain.com/ -> mydomain.com
but I cannot detect and redirect
Out of amusement I tried going to
and got an error.
FetchEvent’s .request.url pathname is always ‘/’ in all cases.