描述
最近搭了一个 mc 的开源皮肤站(blessing-skin-server),使用了一段时间发现登录后清楚浏览器缓存,刷新页面会回到登录页面,登录回跳转到原来的地址,但是 https 变成了 http 。在 github 上提了问题,但还没大佬回Github 上提的问题。
- blessing-skin-server
- nginx
server {
listen 443 ssl http2;
server_name blessing-skin.***.***;
location / {
proxy_pass http://172.17.0.1:57236;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
现状
发现这个地方记录登录前的 url 地址的'last_requested_path' => $request->fullUrl(),,自己试过用 replace 把 http 变 https 是可以,但需要改代码,更新可能就覆盖回来了。
期望
blessing-skin-server是有一个.env文件的,期望能通过修改.env或者nginx.conf配置实现$request->fullUrl()获取到 https 的地址,正常跳转到 https 的地址上。