【问题标题】:How can I disable the HTTP TRACE method in Laravel Forge?如何在 Laravel Forge 中禁用 HTTP TRACE 方法?
【发布时间】:2014-09-03 19:58:54
【问题描述】:

我有一个需要通过安全审查的应用程序。我正在使用 Laravel Forge,有问题的项目是:

应用程序 Web 服务器必须配置为禁用 TRACE 和 其他未使用的 HTTP 方法。

我用

测试过
curl -v -X TRACE http://www.yourserver.com

通过本指南:

https://security.stackexchange.com/questions/31659/testing-for-http-trace-method

而且它没有返回错误消息,所以我假设我仍然需要禁用 TRACE。

使用 Laravel Forge 完成此任务的最佳方法是什么?

【问题讨论】:

    标签: laravel http-trace


    【解决方案1】:

    你可以在 Forge 中编辑你的 nginx 配置,所以你只需要在你的 conf 中添加一个方法过滤器:

    if ($request_method !~ ^(GET|HEAD|POST)$ ) 
    {
        return 444;
    }
    

    【讨论】:

      猜你喜欢
      • 2019-07-02
      • 2020-08-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-26
      相关资源
      最近更新 更多