Created
March 16, 2017 11:54
-
-
Save nextgens/ca501d3c1b149a62c09b0b409e0651a7 to your computer and use it in GitHub Desktop.
Enable browser caching of mtc.js as described in https://github.com/mautic/mautic/issues/3656
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/app/bundles/CoreBundle/Controller/JsController.php b/app/bundles/CoreBundle/Controller/JsController.php | |
index 1bd7fda30..a108d9e85 100644 | |
--- a/app/bundles/CoreBundle/Controller/JsController.php | |
+++ b/app/bundles/CoreBundle/Controller/JsController.php | |
@@ -33,7 +33,7 @@ class JsController extends CommonController | |
$dispatcher->dispatch(CoreEvents::BUILD_MAUTIC_JS, $event); | |
} | |
- return new Response($event->getJs(), 200, ['Content-Type' => 'application/javascript']); | |
+ return new Response($event->getJs(), 200, ['Content-Type' => 'application/javascript', 'Cache-Control' => 'public, max-age=7200']); | |
} | |
/** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment