Added in same site cookie middleware to account for csrf token

This commit is contained in:
2022-01-23 20:59:06 +00:00
parent 36335dc752
commit b05860f8da
4 changed files with 67 additions and 5 deletions
+4
View File
@@ -12,12 +12,16 @@ use api\timelineData;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Factory\AppFactory;
use Selective\SameSiteCookie\SameSiteCookieMiddleware;
// Start slim
$app = AppFactory::create();
// create middleware
$app->addRoutingMiddleware();
// add in same site cookie stuff
$app->add(new SameSiteCookieMiddleware());
// for error checking
$errorMiddleware = $app->addErrorMiddleware(true, true, true);