hellocoop / wordpress

A login and registration WordPress plugin for the Hellō service.
4 stars 2 forks source link

add random element to hello-login/v1/auth_url REST API to force cache busting #75

Closed mscurtescu closed 1 year ago

mscurtescu commented 1 year ago

Is your feature request related to a problem? Please describe.

WP Engine (and possibly other similar WordPress hosts) does respect the cache-control header set in the response of the hello-login/v1/auth_url REST API.

https://wpengine.com/support/cache/

Cache-control headers cannot be set lower than 600 seconds (10 minutes) – anything lower requires a full cache exclusion rule.

Describe the solution you'd like

Add a query parameter with a random value.

Describe alternatives you've considered

WP Engine has exclusion rules, we could try and match some of these rules (by using specific paths, arguments or cookies. This would be a fragile solution that applies only to WP Engine.

WP Engine also has admin controls that allow explicit exclusion rules, but this requires extra manual steps for admins.