[Slim4] Slim Framework CSRF Protection > Web/PHP/API

본문 바로가기
사이트 내 전체검색

Web/PHP/API

[Slim4] Slim Framework CSRF Protection

페이지 정보

작성자 sbLAB 댓글 0건 조회 835회 작성일 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
        )

        ...       
 


댓글목록

등록된 댓글이 없습니다.

회원로그인

접속자집계

오늘
381
어제
401
최대
1,279
전체
222,035

그누보드5
Copyright © sebom.com All rights reserved.