1. 首页
  2. 数据库
  3. 其它
  4. https:将PSR 15中间件重定向到https并添加Strict Transport Security标头 源码

https:将PSR 15中间件重定向到https并添加Strict Transport Security标头 源码

上传者: 2021-02-22 04:05:21上传 ZIP文件 8.59KB 热度 7次
中间件/ https 如果请求为http ,则中间件将重定向到https ,并添加标头以防止协议降级攻击和cookie劫持。 要求 PHP> = 7.2 安装 该软件包可通过Composer作为安装和自动加载。 composer require middlewares/https 例子 $ dispatcher = new Dispatcher ([ ( new Middlewares \ Https ()) -> includeSubdomains () ]); $ response = $ dispatcher -> dispatch ( new ServerRequest ()
下载地址
用户评论