Question: Does this work with own CDN's, or only knowns
Closed this issue · 2 comments
Haven't looked into the code, but if it works with cdn.mydomain.com, I'm good :)
Depends on how you've got your 'own' CDN set up :)
If you mean - can you set up things so that you can run cdn.mydomain.com pointing to something like lighthttpd purely for serving files and static content, then yes. I've got a couple of changes to go in over the next week or so to make that a bit more configurable, but the approach would be
- Using the FileContentReader/FileContentWriter pair, have assets written out to a folder on your filesystem
- Configure lighthttpd/ngnix/other to serve files from that folder, with rules to pattern match for the static file path in the URLs to be served from that location
- pass anything else to be processed by SS normally.
So the changes coming will help with step 2 up there, so that when you configure the CDN stuff, you can provide the domain prefix that should be used for URLs generated for the content reader instead of what happens at present (which is that it uses Director::baseURL to prefix things). That'll make things much easier to configure the standalone domain.
The same thing will be done for the S3 ContentReader so that the URLs generated for that can be replaced with a CloudFront domain for proper CDN serving.
symbiote/silverstripe-s3cdn@0a7da21 introduces a configurable baseUrl for the s3cdn