Load content from an other domain


#1

This is our situation: we have an app on https://www.domain.com but our static resources get served from another domain https://static1.do-main.net.

Our script tag that loads the initial js looks like this:

<script 
  src= "https://static4.do-main.net/production/Helpdesk/helpdesk-app/bundles/main.rev-fcfd19a68b.js"
  base-url="/production/Helpdesk/helpdesk-app/bundles"
  bundles-path="."
  cache-key="rev"
  cache-version="2208e282-6b0b-446d-be56-5f9de25e3127">
</script>

Example:

  1. main.js loads a new bundle tickets.js
  2. tickets.js will load tickets.css
  3. tickets.css will load image.svg.

All these files get loaded from https://www.domain.com instead of https://static4.do-main.net were main.js is loaded initially.

Is it possible to let Steal load content from another domain?


#2

I think all the DoneJS apps are using a CDN which is on another url. Does their technique work for you?

They use renderingBaseURL: https://github.com/donejs/place-my-order/blob/master/package.json#L40

What about changing the base-url to https://static4.do-main.net/production/Helpdesk/helpdesk-app/?


#3

Yeah, I would include the domain your baseURL.


#4

Having some CSP issues in production, will come back to this on monday.