diff options
author | Eric Covener <covener@apache.org> | 2020-11-08 15:25:15 +0000 |
---|---|---|
committer | Eric Covener <covener@apache.org> | 2020-11-08 15:25:15 +0000 |
commit | 07e2875374bf367d191b2ed2b20dcd658c7d1509 (patch) | |
tree | b996cbf54f2d6780fdef40cd30c72a8c7835a61c /docs/manual/mod/mod_allowmethods.xml | |
parent | fb945ce6ec9bd3b29e06c5af4a698a47cb2274f4 (diff) | |
download | httpd-07e2875374bf367d191b2ed2b20dcd658c7d1509.tar.gz |
PR64785: mod_allowmethods: Allow methods to be added/removed with +/- prefix
Committed By: covener
Submitted By: Marcel Montes <spiceman gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1883203 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/mod/mod_allowmethods.xml')
-rw-r--r-- | docs/manual/mod/mod_allowmethods.xml | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/docs/manual/mod/mod_allowmethods.xml b/docs/manual/mod/mod_allowmethods.xml index 42e0aa5f52..33944f46ef 100644 --- a/docs/manual/mod/mod_allowmethods.xml +++ b/docs/manual/mod/mod_allowmethods.xml @@ -46,6 +46,10 @@ used on a server. The most common configuration would be:</p> <Location "/"> AllowMethods GET POST OPTIONS </Location> + +<Location "/nopost"> + AllowMethods -POST +</Location> </highlight> </summary> @@ -53,11 +57,12 @@ used on a server. The most common configuration would be:</p> <directivesynopsis> <name>AllowMethods</name> <description>Restrict access to the listed HTTP methods</description> -<syntax>AllowMethods reset|<em>HTTP-method</em> -[<em>HTTP-method</em>]...</syntax> +<syntax>AllowMethods reset | [+|-]<var>HTTP-method</var> +[ [+|-]<var>HTTP-method</var> ] ...</syntax> <default>AllowMethods reset</default> <contextlist><context>directory</context></contextlist> <status>Experimental</status> +<compatibility>+/- added in 2.5.1</compatibility> <usage> @@ -77,9 +82,28 @@ turn off <module>mod_allowmethods</module> in a deeper nested context:</p> use <directive module="core">TraceEnable</directive> instead.</p> </note> +<p>Normally, if multiple <directive>AllowMethods</directive> could +apply to a directory, then the most specific one is used and +others are ignored; the methods are not merged. (See <a +href="../sections.html#merging">how sections are merged</a>.) +However if <em>all</em> the methods on the +<directive>AllowMethods</directive> directive are preceded by a +<code>+</code> or <code>-</code> symbol, the options are +merged. Any method preceded by a <code>+</code> are added to the +methods currently in force, and any method preceded by a +<code>-</code> are removed from the methods currently in +force. </p> + +<note><title>Note</title> +<p>Mixing <directive>AllowMethods</directive> with a <code>+</code> or +<code>-</code> with those without is not valid syntax and will be +rejected during server startup by the syntax check with an abort.</p> +</note> + <p><module>mod_allowmethods</module> was written to replace the rather kludgy implementation of <directive module="core">Limit</directive> and <directive module="core">LimitExcept</directive>.</p> + </usage> </directivesynopsis> |