2

I'm attempting to get the Control Panel assets to load from a CDN instead of locally from Craft.

Going through the config options here and here I can't seem to find a way to change the asset URL.

Is there any way to change the asset url (in this case for control panel)?

2
  • Are you trying to get proper Assets (craftcms.com/docs/assets) to be served from a CDN (and therefore would be served from both the control panel and front-end of the site) or are you actually trying to get the CSS/JS/Images that Craft uses to style the control panel to be served form a CDN? – Brad Bell Aug 29 '16 at 21:32
  • Thanks for the clarification question - I'm attempting to get the assets (JS, CSS, etc) for the Control Panel to be served from CDN. – Chris Aug 29 '16 at 21:34
2

I can't think of a way to do this.

Problem #1: the URLs generated for control panel resources are based on the Craft install's Site URL (whether that's defined in Settings->General or via the config setting and that is taken into account when creating all links in Craft, not just for control panel resources requests.

Problem #2: in Craft 2, all control panel resources are actually served through PHP, not the web server. I suspect even if you found a way around #1, this would cause separate issues.

1
  • Thank you. I came to the same conclusion and hoped someone with more experience on the platform might know a workaround. Thanks again for your help! – Chris Aug 29 '16 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.