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);
// Default to an HTML Content-Type. Devs can override if needed.
$this->
setContentType('text/html'
);
} /**
* Turns "pretend" mode on or off to aid in testing.
*
* Note that this is not a part of the interface so
* should not be relied on outside of internal testing.
*
* @return $this
*
* @testTag only available to test code
*/