Is it possible to filter OPTIONS calls from a location and redirect them somewhere else? Tried this configuration but didn't work:
location /example/ {
proxy_pass http://example.com;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_request_headers on;
limit_except OPTIONS {
proxy_pass http://anotherurl.com;
}
}