abdus Posted April 11, 2017 Share Posted April 11, 2017 I'm guessing since PW skips processing template files and serves directly from /site/cache/, HTTP headers I set inside templates are ignored. Is there a hook that I can use to run code just before cached page is sent to user? Would using /site/finished.php work? Edit: finished.php is run after page is sent, so it's not working Link to comment Share on other sites More sharing options...
abdus Posted April 11, 2017 Author Share Posted April 11, 2017 Second edit: hooking after Page::render works <?php wire()->addHookAfter('Page::render', function (HookEvent $e) { header('x: test'); // works }); 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now