Returning A Custom Block Page
- 11 May 2023
- Print
- DarkLight
Returning A Custom Block Page
- Updated on 11 May 2023
- Print
- DarkLight
Article Summary
Share feedback
Thanks for sharing your feedback!
It is possible to return a customized block page instead of PX default one.
The block page returned by Fastly Enforcer is defined in the subroutine px_custom_create_block_page
in px_custom.vcl
file.
To set your own block page, set the req.http.X-PX-block-page
header to a string containing the html of the desired block page.
For example:
sub px_custom_create_block_page {
set req.http.X-PX-block-page = {“<!DOCTYPE html> <html> <body> block page </body> </html>”};
}
Was this article helpful?