scully: scully-content doesn't work when served over https from CloudFlare
🐞 Bug report
Description
🔬 Minimal Reproduction
https://scully-demo.stewan.io/
Then press the link “this is a blog post”
it works on non-secure urls, though.
Here is the repo
https://github.com/stewwan/scully-demo
💻Your Environment
Angular Version:
Scully Version:
🔥 Exception or Error
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (15 by maintainers)
@stewwan I am looking into this. I am sorry that we’ve frustrated you with closing this issue so fast. I want to spend some additional time looking into this issue for you. If I find something (fingers crossed) we can reopen it. It appears, though, that @SanderElias is probably right that this is some weird host thing that we can’t control.
I will let you know what I find. And THANK YOU for helping us out, and trying out Scully, and submitting issues you run into. I hope that we can help you solve this issue, and help you be successful in your efforts to better understand SSG around Angular.
@SanderElias Thank you for the quick and excellent feedback!
I was able to fix my issue based on your insight, I am now able to use Cloudflare’s caching functionality with Scully.
The solution was to go into the Speed/Optimization settings area and turn off Auto Minify for HTML files:
@BrendanSluke I suspect there is some HTML modification going on that breaks The way Scully injects the comments it needs. We had the same exact issue with an HTML minifier. You might need to do a setting so that the script we inline in the pages does opt out of “optimization”. You opt out of a 7 bytes optimization now. I did manually optimize that piece of code, and the bytes they remove will break it. The script has an id (
id="ScullyIO-transfer-state"
) so it should not be that hard to exclude that from the optimizerat this point I can see problem isn’t with Scully. Thanks y’all will share if I discover anything.