- Issue created by @pobster
- Status changed to Needs review
10 months ago 3:10pm 10 February 2024 - 🇬🇧United Kingdom pobster
I'm marking this as for review ... but I haven't even tested it myself yet...
- Status changed to Postponed
10 months ago 4:05pm 10 February 2024 - 🇬🇧United Kingdom pobster
Ugh ... okay - that's annoying. Seems this isn't possible without overriding the entire service as it contains;
\Drupal::service('page_cache_kill_switch')->trigger();
And it doesn't look like that's able to be reverted :( Lemme think about it, maybe there's another way ...
edit: I admit I'm maybe a niche case (long-term parking of domains) but this should still be possible IMO.
- 🇬🇧United Kingdom pobster
Ugh ... I'm just going to have to do this in Varnish instead. So much for Drupal being flexible.
- Status changed to Closed: won't fix
10 months ago 6:44pm 12 February 2024 - 🇬🇧United Kingdom pobster
Here's what I ended up doing:
sub vcl_recv { # Check if this is one of our sites in maintenance mode. if ( req.http.host ~ "^(www\.)?drupal\.org$" ) { set req.http.X-Maintenance-Mode = "true"; } } sub vcl_backend_response { # Check if we're in maintenance mode. if (bereq.http.X-Maintenance-Mode) { set beresp.http.Cache-Control = "public, max-age=86400"; unset beresp.http.Set-Cookie; unset beresp.http.X-Maintenance-Mode; set beresp.ttl = 1d; } }