• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • mod_allowmethods

    描述:轻松限制可在服务器上使用的 HTTP 方法
    状态:试验
    模块标识符: allowmethods_module
    源文件: mod_allowmethods.c
    兼容性:可在 Apache 2.3 及更高版本中使用

    摘要

    此模块可以轻松限制可在服务器上使用的 HTTP 方法。最常见的配置是:

    <Location "/">
       AllowMethods GET POST OPTIONS
    </Location>
    

    AllowMethods 指令

    描述:限制对列出的 HTTP 方法的访问
    句法:AllowMethods reset\|HTTP-method[HTTP-method]...
    默认:AllowMethods reset
    Context:目录
    状态:试验
    模块: mod_allowmethods

    HTTP-methods 区分大小写,根据 RFC,通常以大写字母给出。 GET 和 HEAD 方法被视为等效方法。reset关键字可用于在更深层次的嵌套 context 中关闭mod_allowmethods:

    <Location "/svn">
       AllowMethods reset
    </Location>
    

    警告

    该模块不能拒绝 TRACE 方法;请改用TraceEnable。

    编写mod_allowmethods以替换限制和LimitExcept 中的相当 kludgy implementation。


    上篇:mod_alias

    下篇:mod_asis