I am not getting any good document for using CDN with meteor application. Anyone can guide me to CDN with meteor application ?
Thanks, hare
I've detailed how we accomplished this at Edthena in this post. The TLDR is:
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 defaults 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 can end up with cross origin errors (unless you use a font data URL). Josh Owens describes how to deal with that in his post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With