Automatically {% expires %}
What are you trying to do?
Run Knock Knock on Craft Cloud. Static file caching interferes with login and accidentally allowed a private site to become public.
What's your proposed solution?
According to the docs, the fix for this is to add {% expires %} to the template. Ideally that would be done automatically so we don't have to remember to remove that code when the site launches. https://craftcms.com/docs/cloud/static-caching.html#opting-out
Additional context
@timkelty recommended filing a feature request for this to be automatically triggered by sites that have Knock Knock enabled after I filed a support request.
Fixed for the next release. To get this early, run composer require verbb/knock-knock:"dev-craft-4 as 2.0.13" or composer require verbb/knock-knock:"dev-craft-5 as 3.0.4".
@engram-design I'm not up to date on the details with this plugin necessarily, but should just be a matter of setting cache-control header (Craft::$app->getResponse()->setNoCacheHeaders() for anything that should categorically not be cached.