I'm working on a Content Security Policy and need to set an HTTP header after all templates have finished processing. Right now I'm doing that by calling a module variable at the bottom of the main layout template, but that feels brittle.
Is there an Event that can be used for this? I've looked through craft\events in the API docs but don't see a good candidate.