return Response.redirect(“https://www.mydomain.com/"+random_Route()+"/”+urlPathname, 301);
I am trying to redirect my route to another random routes , for example if there is an request it needs to be redirected to another uri paths.
Response.redirect( url , code ) works fine but the problem is when using getJSON from jquery or on ajax calls , it can’t be reached due to cors problem.
How can I fix cors problem of Response.redirect on worker.
(destination urls are added cors headers and fetch is not compactible )