Created
June 3, 2016 20:33
-
-
Save emsearcy/cb311c7b39723cffd0aa9f633091272d to your computer and use it in GitHub Desktop.
Don't cache maintenance pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/includes/common.inc b/includes/common.inc | |
index ceac115..f3ada95 100644 | |
--- a/includes/common.inc | |
+++ b/includes/common.inc | |
@@ -2711,6 +2711,7 @@ function drupal_deliver_html_page($page_callback_result) { | |
// Print a 503 page. | |
drupal_maintenance_theme(); | |
drupal_add_http_header('Status', '503 Service unavailable'); | |
+ drupal_add_http_header('Cache-Control', 'no-cache, must-revalidate, post-check=0, pre-check=0'); | |
drupal_set_title(t('Site under maintenance')); | |
print theme('maintenance_page', array('content' => filter_xss_admin(variable_get('maintenance_mode_message', | |
t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal'))))))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment