clarkwinkelmann [deleted] this is the existing issue https://github.com/flarum/core/issues/822 This is currently not part of any milestone. If you need this feature you can probably get it commissioned from a core or extension developer. Also the question was also asked before: https://discuss.flarum.org/d/20685-how-does-the-assets-folder-bind-to-other-cdn https://discuss.flarum.org/d/2173-how-do-i-change-the-cdn-used-in-my-flarum
[deleted] @clarkwinkelmann I know it was asked before, but there hasn't been any movement. Would any dev be interested in picking this up for a fee ?
jordanjay29 Leanna If you check the issue link that Clark posted, you'll see that the person who started the issue was Toby. This is on Flarum's agenda, for sure, there are just other priorities ahead of it.
[deleted] Just circling back here as it's been a while. I'm interested in paying for development to get CDN support - although I do firmly believe it should be in the core as it would benefit others tremendously.
[deleted] Anyone ? Flarum really needs distributed CDN support. I'm happy to help fund this if any of the devs are interested.
BartVB We (Bokt.nl) are also interested in this and are willing to help fund this. Would be great if all static assets are loaded from a CDN/different domain.
luceos My thoughts on this BartVB 😀 for the new upload extension I have been doing some work on an extension that has no other use than configuring filesystem drivers for other extensions: https://github.com/FriendsOfFlarum/filesystem-drivers. It is not finished yet, but would greatly add more power and ease of configuration to extensions and webmasters. with this done, we could create an extension that allows storing the compiled js and css to one of those preconfigured filesystems and receive its public url to be used in Flarum I haven't done any research yet on the second step, but it is possible to replace the RevisionCompiler, even though that requires replacing both the LessCompiler and the JsCompiler separately.
[deleted] luceos I could be (very) wrong here, but wouldn't a simple extension that rewrites the URL be sufficient to enable CDN support ? This is effectively how WordPress does it.
luceos [deleted] wouldn't a simple extension that rewrites the URL be sufficient to enable CDN support ? This is effectively how WordPress does it. Yes for pull CDN's. But those have their issues as well with a scaled infrastructure. My proposal is for push CDN's, which gives full control to the app/op in terms of deployment of assets.
[deleted] For anyone looking for a decent, fairly priced CDN provider, take a look at BunnyCDN - https://bunnycdn.com. I have no affiliation with them, but they are simply fantastic.
[deleted] luceos My requirement is for pull only, which I think would also suit most on here for static resources only. Even just pull support will massively improve the speed of flarum giving it the ability to be distributed from the static files perspective, and bring the website much closer to the users.
matteocontrini luceos Yes for pull CDN's. But those have their issues as well with a scaled infrastructure. My proposal is for push CDN's, which gives full control to the app/op in terms of deployment of assets. I never heard of this. CloudFront, CloudFlare, Akamai and Fastly, that are the most common, only support pull mode
[deleted] This is how it's done with Laravel currently (from a coding perspective) using a pull zone https://www.keycdn.com/support/laravel-cdn-integration
luceos In a horizontally scaled environment you won't let all nodes recompile assets and publish their own version. The best solution then would to have the assets compiled during the CI/CD pipeline, in that situation you can also use a pull CDN. This would be my recommendation anyway.
[deleted] luceos Thanks. I guess this is now an official extension request ! One that I am prepared to fund.