Full URL in assets erb file --> multisite issues

You are correct, local_cdn_url replaces a local URL with a CDN URL. And this is not even a local URL but a relative one.

So I think these would suffice instead of those UrlHelper calls?

importScripts("<%= (Discourse.asset_host || '') + "/javascripts/workbox/workbox-sw.js" %>");

and

modulePathPrefix: (Discourse.asset_host || '') + "/javascripts/workbox",

1 Like