From fc8c5c0be6e89e76059398fb993e222fcf266c0d Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 2 Apr 2016 10:02:52 -0400 Subject: [PATCH] CRM-17965 - Fix contribution widget on Drupal --- extern/widget.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extern/widget.php b/extern/widget.php index 4d7b04eb71..0980e5a448 100644 --- a/extern/widget.php +++ b/extern/widget.php @@ -56,6 +56,10 @@ $output = ' var ' . $jsonvar . ' = ' . json_encode($data) . '; '; -CRM_Core_Page_AJAX::setJsHeaders(60); +// FIXME: Not using CRM_Core_Page_AJAX::setJsHeaders because CMS is not bootstrapped +header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 60)); +header('Content-Type: application/javascript'); +header("Cache-Control: max-age=60, public"); + echo $output; CRM_Utils_System::civiExit(); -- 2.25.1