Can apache be configured to ignore OPTIONS requests? Can apache be configured to ignore OPTIONS requests? apache apache

Can apache be configured to ignore OPTIONS requests?


The rewrite option is good, the 'Apache Way' is probably more like:

<LimitExcept GET POST>deny from all</LimitExcept>

or...

<Limit OPTIONS>deny from all</Limit>


I found a solution used by a different framework and ported to Django. I place this at the top of any view that generate HTML with links to .XLS or .DOC files:

if request.method == 'OPTIONS':    response = HttpResponse()    response['Allow'] = 'GET, HEAD, POST'    return response

I like Apache solution better though... assuming it doesn't cause problems on the Windows side of things.


How about:

RewriteEngine OnRewriteCond %{REQUEST_METHOD} ^OPTIONRewriteRule .* - [F]

(With mod_rewrite enabled.)