Return http status ok (200) on request method OPTIONS Apache
Posted
by
jazz
on Server Fault
See other posts from Server Fault
or by jazz
Published on 2013-11-08T21:29:57Z
Indexed on
2013/11/08
21:57 UTC
Read the original article
Hit count: 293
I have a apache server which uses Reverse Proxy to connect/direct to a tomcat server. Using virtualHost,
RequestHeader set X-Forwarded-Proto "http"
ServerName image.abc.local
DocumentRoot "/var/www/html"
ProxyRequests Off
ProxyTimeout 600
ProxyPass /abc http://image.abc.local:9001/abc
ProxyPass /xyz http://image.abc.local:9001/xyz
ProxyPassReverse /abc http://image.abc.local:9001/abc
ProxyPassReverse /xyz http://image.abc.local:9001/xyz
what i want to achieve here is that, when there is a REQUEST_METHOD OPTIONS i want simply return HTTP status OK (200). I dont want the request to be received by the tomcat server and process it. For performance based concerns i want this request to be handled at apache level.
with all the research i was still unable to get this to run;
RewriteEngine on
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule .* - [R=200m]
can somebody assist me with what rewrite rule should be there? or is there an alternative to RewriteEngine?
Thanks
© Server Fault or respective owner