"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "manager-bundle/src/Resources/skeleton/web/preview.php" between
contao-4.9.11.tar.gz and contao-4.9.12.tar.gz

About: Contao (fka TYPOlight) is a content management system (CMS). Long-term support (LTS).

preview.php  (contao-4.9.11):preview.php  (contao-4.9.12)
skipping to change at line 22 skipping to change at line 22
use Contao\ManagerBundle\HttpKernel\ContaoKernel; use Contao\ManagerBundle\HttpKernel\ContaoKernel;
use FOS\HttpCache\TagHeaderFormatter\TagHeaderFormatter; use FOS\HttpCache\TagHeaderFormatter\TagHeaderFormatter;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\TerminableInterface; use Symfony\Component\HttpKernel\TerminableInterface;
// Suppress error messages (see #1422) // Suppress error messages (see #1422)
@ini_set('display_errors', '0'); @ini_set('display_errors', '0');
// Disable the phar stream wrapper for security reasons (see #105) // Disable the phar stream wrapper for security reasons (see #105)
if (\in_array('phar', stream_get_wrappers(), true)) { if (in_array('phar', stream_get_wrappers(), true)) {
stream_wrapper_unregister('phar'); stream_wrapper_unregister('phar');
} }
/** @var Composer\Autoload\ClassLoader */ /** @var Composer\Autoload\ClassLoader */
$loader = require __DIR__.'/../vendor/autoload.php'; $loader = require __DIR__.'/../vendor/autoload.php';
$request = Request::createFromGlobals(); $request = Request::createFromGlobals();
$kernel = ContaoKernel::fromRequest(\dirname(__DIR__), $request); $request->attributes->set('_preview', true);
$kernel = ContaoKernel::fromRequest(dirname(__DIR__), $request);
$response = $kernel->handle($request); $response = $kernel->handle($request);
// Prevent preview URLs from being indexed // Prevent preview URLs from being indexed
$response->headers->set('X-Robots-Tag', 'noindex'); $response->headers->set('X-Robots-Tag', 'noindex');
// Force no-cache on all responses in the preview front controller // Force no-cache on all responses in the preview front controller
$response->headers->set('Cache-Control', 'no-store'); $response->headers->set('Cache-Control', 'no-store');
// Strip all tag headers from the response // Strip all tag headers from the response
$response->headers->remove(TagHeaderFormatter::DEFAULT_HEADER_NAME); $response->headers->remove(TagHeaderFormatter::DEFAULT_HEADER_NAME);
 End of changes. 2 change blocks. 
2 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)