PHP-075 / 中级
对外暴露配置缓存或环境变量(config:cache 文件)
为什么存在问题?
bootstrap/cache/config.php 公开会泄露所有配置值。
如何修复
nginx
# 仅将 public 作为文档根目录,阻止 Web 访问 bootstrap/storage 路径 PHP-075 / 中级
bootstrap/cache/config.php 公开会泄露所有配置值。
# 仅将 public 作为文档根目录,阻止 Web 访问 bootstrap/storage 路径