Jump to content

Recommended Posts

Posted

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

Posted

Second edit: hooking after Page::render works

<?php
wire()->addHookAfter('Page::render', function (HookEvent $e) {
    header('x: test'); // works
});

 

  • Like 3

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...