noCache example

if ($this->hasHeader('Content-Type')) {
            $this->setContentTypeByMimeType();
        }

        if ($this->hasHeader('Content-Disposition')) {
            $this->setHeader('Content-Disposition', $this->getContentDisposition());
        }

        $this->setHeader('Expires-Disposition', '0');
        $this->setHeader('Content-Transfer-Encoding', 'binary');
        $this->setHeader('Content-Length', (string) $this->getContentLength());
        $this->noCache();
    }

    /** * output download file text. * * @return DownloadResponse * * @throws DownloadException */
    public function sendBody()
    {
        
/** * Constructor * * @param App $config * * @todo Recommend removing reliance on config injection */
    public function __construct($config)
    {
        // Default to a non-caching page.         // Also ensures that a Cache-control header exists.         $this->noCache();

        // We need CSP object even if not enabled to avoid calls to non existing methods         $this->CSP = Services::csp();

        $this->CSPEnabled = $config->CSPEnabled;

        $this->cookieStore = new CookieStore([]);

        $cookie = config(CookieConfig::class);

        Cookie::setDefaults($cookie);

        
Home | Imprint | This part of the site doesn't use cookies.