Cloudfront
I detailed how we did this at Edthena in this post . TL; DR:
Add this line somewhere in your server code:
WebAppInternals.setBundledJsCssPrefix(CDN_URL);
Where CDN_URL is your CloudFront URL (e.g. https://a27n0s89ik4xb3.cloudfront.net ).
We kept the default values ββwhen creating the CloudFront distribution, except for the following:
Origin Domain Name: myapp.example.com Origin ID: myapp.example.com Viewer Protocol Policy: HTTPS Only Compress Objects Automatically: yes
If you serve your own fonts, you may get cross-origin errors (if you don't use the font data URL). Josh Owens describes how to handle this in his post .
Cloudflare
Check out Cloudflare meets Meteor on the meteorhacks blog. If you are a CloudFlare user, this is a fairly simple solution, but you need to disable WebSockets (either pay a lot or use a sophisticated workaround).
source share