https:将PSR 15中间件重定向到https并添加Strict Transport Security标头 源码
中间件/ https 如果请求为http ,则中间件将重定向到https ,并添加标头以防止协议降级攻击和cookie劫持。 要求 PHP> = 7.2 安装 该软件包可通过Composer作为安装和自动加载。 composer require middlewares/https 例子 $ dispatcher = new Dispatcher ([ ( new Middlewares \ Https ()) -> includeSubdomains () ]); $ response = $ dispatcher -> dispatch ( new ServerRequest ()
下载地址
用户评论