[Slim4] Slim Framework CSRF Protection
페이지 정보
작성자 sbLAB 댓글 0건 조회 322회 작성일 23-07-16 21:42본문
Slim Framework CSRF Protection
https://github.com/slimphp/Slim-Csrf
- 요청시 마다 CSRF 검증 토큰 발행함(기본값)
- 발행된 CSRF 검증 토큰을 유지하도록 설정 가능함(axios/ajax 요청 에 필요)
<?php
//Slim-Csrf/src/Guard.php __construct 수정
public function __construct(
ResponseFactoryInterface $responseFactory,
string $prefix = 'csrf',
&$storage = null,
?callable $failureHandler = null,
int $storageLimit = 200,
int $strength = 16,
bool $persistentTokenMode = false //<--- true
)
...
댓글목록
등록된 댓글이 없습니다.