A recent setup which uses an AWS CloudFront in front of WordPress has noticed that the cache headers - Cache-Control / Expires - is not always present on some requests / URLs related to the SSO flow.
This PR ensures that the headers are present and adheres to how WordPress issues the headers, by utilising the wp_get_nocache_headers() (Doc Ref) function. It doesn't use the nocache_headers() function in case we need to add additional headers specifically for Dark Matter support in the future.
In addition, the redirects have been updated to ensure that the X-Redirect-By header value is for Dark Matter and not WordPress.
A recent setup which uses an AWS CloudFront in front of WordPress has noticed that the cache headers -
Cache-Control
/Expires
- is not always present on some requests / URLs related to the SSO flow.This PR ensures that the headers are present and adheres to how WordPress issues the headers, by utilising the
wp_get_nocache_headers()
(Doc Ref) function. It doesn't use thenocache_headers()
function in case we need to add additional headers specifically for Dark Matter support in the future.In addition, the redirects have been updated to ensure that the
X-Redirect-By
header value is for Dark Matter and not WordPress.