Merge pull request #305 from akirk/fix-edge-caching-problems

Fix Edge Caching Problems
This commit is contained in:
Alex Kirk 2023-04-21 19:58:58 +02:00 committed by GitHub
commit 69aa0b9691
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,6 +39,9 @@ class Activitypub {
return $template;
}
// Ensure that edge caches know that this page can deliver both HTML and JSON.
header( 'Vary: Accept' );
// check if user can publish posts
if ( \is_author() && ! user_can( \get_the_author_meta( 'ID' ), 'publish_posts' ) ) {
return $template;