Trying to find if there is a way, and a "best way", for being able to rewrite content of JS files with proper paths.

There are some stupid apps out there that have hard paths in JS files, which are not picked up by the default re-writer and cause functionality issues.

Of course, I don't want to overload the gateway with having to scan and check every single JS file that goes through it either.

Path is the cheapest way for us to do things as Wildcard certificates are "banned" as an option and for some reason they use one of the more expensive CA's to sign certs