same site cookie to strict
This commit is contained in:
parent
d461b5bf55
commit
3f5ebd2de1
5
dist/api/index.php
vendored
5
dist/api/index.php
vendored
@ -12,6 +12,7 @@ use api\projectData;
|
||||
use api\timelineData;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Selective\SameSiteCookie\SameSiteCookieConfiguration;
|
||||
use Slim\Factory\AppFactory;
|
||||
use Selective\SameSiteCookie\SameSiteCookieMiddleware;
|
||||
|
||||
@ -20,8 +21,10 @@ $app = AppFactory::create();
|
||||
// create middleware
|
||||
$app->addRoutingMiddleware();
|
||||
|
||||
$ssConfig = new SameSiteCookieConfiguration(["same_site" => "strict"]);
|
||||
|
||||
// add in same site cookie stuff
|
||||
$app->add(new SameSiteCookieMiddleware());
|
||||
$app->add(new SameSiteCookieMiddleware($ssConfig));
|
||||
|
||||
// for error checking
|
||||
$errorMiddleware = $app->addErrorMiddleware(true, true, true);
|
||||
|
@ -12,6 +12,7 @@ use api\projectData;
|
||||
use api\timelineData;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Selective\SameSiteCookie\SameSiteCookieConfiguration;
|
||||
use Slim\Factory\AppFactory;
|
||||
use Selective\SameSiteCookie\SameSiteCookieMiddleware;
|
||||
|
||||
@ -20,8 +21,10 @@ $app = AppFactory::create();
|
||||
// create middleware
|
||||
$app->addRoutingMiddleware();
|
||||
|
||||
$ssConfig = new SameSiteCookieConfiguration(["same_site" => "strict"]);
|
||||
|
||||
// add in same site cookie stuff
|
||||
$app->add(new SameSiteCookieMiddleware());
|
||||
$app->add(new SameSiteCookieMiddleware($ssConfig));
|
||||
|
||||
// for error checking
|
||||
$errorMiddleware = $app->addErrorMiddleware(true, true, true);
|
||||
|
Loading…
Reference in New Issue
Block a user