mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Remove different caching headers for development
This has the reason that it's better to add a cache-buster via requirejs, so only the main.js module must be modified in development mode and we avoid an ugly bug in recent Chrome versions that prevents <script> nodes from being correctly loaded in some cases (aborted requests) refs #4611 (not really, but kind of)
This commit is contained in:
parent
f3a47553f8
commit
62e98ccbd7
@ -117,13 +117,8 @@ class StaticController extends ActionController
|
|||||||
}
|
}
|
||||||
$response = $this->getResponse();
|
$response = $this->getResponse();
|
||||||
$response->setHeader('Content-Type', 'text/javascript');
|
$response->setHeader('Content-Type', 'text/javascript');
|
||||||
if (!IcingaConfig::app()->global->get('environment') == 'development') {
|
$this->setCacheHeader(3600);
|
||||||
$this->setCacheHeader(3600);
|
|
||||||
} else {
|
|
||||||
$response->setHeader('Pragma', 'no-cache', true);
|
|
||||||
$response->setHeader('Cache-Control', 'max-age=-3600', true);
|
|
||||||
|
|
||||||
}
|
|
||||||
$response->setHeader(
|
$response->setHeader(
|
||||||
'Last-Modified',
|
'Last-Modified',
|
||||||
gmdate(
|
gmdate(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user