Apache HTTP Server 版本 2.4
說明 | 輕鬆限制伺服器上可以使用的 HTTP 方法 |
---|---|
狀態 | 實驗 |
模組識別 | allowmethods_module |
原始檔 | mod_allowmethods.c |
相容性 | Apache 2.3 及後續版本均可用 |
此模組讓限制伺服器上可以使用的 HTTP 方法變得更加容易。最常見的設定為
<Location "/"> AllowMethods GET POST OPTIONS </Location>
說明 | 限制存取已列出的 HTTP 方法 |
---|---|
語法 | AllowMethods 重設|HTTP 方法 [HTTP 方法]... |
預設 | AllowMethods 重設 |
內容 | 目錄 |
狀態 | 實驗 |
模組 | mod_allowmethods |
HTTP 方法區分大小寫,且通常根據 RFC 以大寫表示。GET 和 HEAD 方法視為等同。重設
關鍵字可用於在更深入的巢狀內容中關閉 mod_allowmethods
<Location "/svn"> AllowMethods reset </Location>
此模組無法拒絕 TRACE 方法;請改用 TraceEnable
。
是為取代 mod_allowmethods
Limit
和 LimitExcept
的笨拙執行方式而撰寫的。