# Does nginx support OPTIONS request method?

**URL:** <https://www.ruby-forum.com/t/does-nginx-support-options-request-method/193594>\
**Category:** NGINX\
**Created:** [August 20, 2010, 9:51am UTC](https://www.ruby-forum.com/t/does-nginx-support-options-request-method/193594 "2010-08-20T09:51:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@joro](https://www.ruby-forum.com/u/joro)\
**Post date:** [August 20, 2010, 9:51am UTC](https://www.ruby-forum.com/t/does-nginx-support-options-request-method/193594/1 "2010-08-20T09:51:46Z")

</div>

Hi guys,  
I am trying to make a cross-domain ajax request. The problem comes when  
i try to POST .  
Then Firefox makes “preflighted” request to see if it is OK to go  
ahead.  
Here is the request :

OPTIONS /publish/?id=123 HTTP/1.1  
Host: 10.1.2.50:8002  
User-Agent: Mozilla/5.0 (X11; U; Linux x86\_64; en-US; rv:1.9.2.8)  
Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8  
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8  
Accept-Language: en-us,en;q=0.5  
Accept-Encoding: gzip,deflate  
Accept-Charset: ISO-8859-1,utf-8;q=0.7,\*;q=0.7  
Keep-Alive: 115  
Connection: keep-alive  
Origin: [http://10.1.2.50](http://10.1.2.50)  
Access-Control-Request-Method: POST

and response :

HTTP/1.1 405 Not Allowed  
Server: nginx/0.7.67  
Date: Fri, 20 Aug 2010 07:11:52 GMT  
Content-Type: text/html  
Content-Length: 173  
Connection: keep-alive  
Allow: GET, POST, PUT, DELETE

Posted at Nginx Forum:

> **[Does nginx support OPTIONS request method ?](https://forum.nginx.org/read.php?2,121635,121635#msg-121635)**
>
> Hi guys, I am trying to make a cross-domain ajax request. The problem comes when i try to POST . Then Firefox makes "preflighted" request to see if it is OK to go ahead. Here is the request : OPTIONS /publish/?id=123 HTTP/1.1 Host:...

---

<div class="post-metadata">

**Author:** ![joro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@joro](https://www.ruby-forum.com/u/joro)\
**Post date:** [August 20, 2010, 10:29am UTC](https://www.ruby-forum.com/t/does-nginx-support-options-request-method/193594/2 "2010-08-20T10:29:49Z")

</div>

Hi,

> and response :
> 
> HTTP/1.1 405 Not Allowed  
> Server: nginx/0.7.67  
> Date: Fri, 20 Aug 2010 07:11:52 GMT  
> Content-Type: text/html  
> Content-Length: 173  
> Connection: keep-alive  
> Allow: GET, POST, PUT, DELETE

This response didn’t come from nginx, but from your backend.

Best regards,  
Piotr S. \< [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) \>

---

<div class="post-metadata">

**Author:** ![joro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@joro](https://www.ruby-forum.com/u/joro)\
**Post date:** [August 20, 2010, 10:45am UTC](https://www.ruby-forum.com/t/does-nginx-support-options-request-method/193594/3 "2010-08-20T10:45:38Z")

</div>

I don’t think i understand what you say…  
I don’t have any backend. This is clean nginx install( no fast-cgi or  
what so ever) with http\_push module.  
Actually i am able to get the messages , but not post one.

All this works if i don’t use cross-domain requests (but then no OPTIONS  
request is made).

Posted at Nginx Forum:

> **[Re: Does nginx support OPTIONS request method ?](https://forum.nginx.org/read.php?2,121635,121654#msg-121654)**
>
> Hi guys, I am trying to make a cross-domain ajax request. The problem comes when i try to POST . Then Firefox makes "preflighted" request to see if it is OK to go ahead. Here is the request : OPTIONS /publish/?id=123 HTTP/1.1 Host:...

---

<div class="post-metadata">

**Author:** ![joro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@joro](https://www.ruby-forum.com/u/joro)\
**Post date:** [August 20, 2010, 11:20am UTC](https://www.ruby-forum.com/t/does-nginx-support-options-request-method/193594/4 "2010-08-20T11:20:10Z")

</div>

Hi,

> I don’t think i understand what you say..

I’m saying that response you presented wasn’t send by nginx (core)  
itself.

> I don’t have any backend. This is clean nginx install( no fast-cgi or  
> what so ever) with http\_push module.

This is _very important_ information, that you didn’t bother to mention  
earlier… And as it turns out, that response was produced by  
nginx\_http\_push\_module, so you should probably contact its author and  
ask  
him if your particular use case is supported (because it seems that this  
module supports at least some OPTIONS requests).

Best regards,  
Piotr S. \< [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) \>
