You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "Peter Wilmott (JIRA)" <ji...@apache.org> on 2017/03/06 12:35:33 UTC

[jira] [Commented] (COUCHDB-3319) Unable to modify cors/methods to enable HTTP OPTIONS requests

    [ https://issues.apache.org/jira/browse/COUCHDB-3319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15897197#comment-15897197 ] 

Peter Wilmott commented on COUCHDB-3319:
----------------------------------------

Full request headers:

{quote}
OPTIONS /apps/1587acb99e26abd6567ddd1fb70009ea?rev=1-967a00dff5e02add41819138abb3284d HTTP/1.1
Host: localhost:5984
Connection: keep-alive
Access-Control-Request-Method: DELETE
Origin: http://localhost:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Access-Control-Request-Headers:
Accept: */*
Referer: http://localhost:8080/client/
Accept-Encoding: gzip, deflate, sdch, br
Accept-Language: en-US,en;q=0.8
{quote}

Full response headers:
{quote}
HTTP/1.1 405 Method Not Allowed
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: http://localhost:8080
Access-Control-Expose-Headers: content-type, cache-control, accept-ranges, etag, server, x-couch-request-id, x-couch-update-newrev, x-couchdb-body-time
Allow: DELETE,GET,HEAD,POST,PUT,COPY
Cache-Control: must-revalidate
Content-Length: 85
Content-Type: application/json
Date: Mon, 06 Mar 2017 12:33:38 GMT
Server: CouchDB/2.0.0 (Erlang OTP/17)
X-Couch-Request-ID: 039173384b
X-CouchDB-Body-Time: 0
{quote}

> Unable to modify cors/methods to enable HTTP OPTIONS requests
> -------------------------------------------------------------
>
>                 Key: COUCHDB-3319
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-3319
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>            Reporter: Peter Wilmott
>
> I'm running CouchDB 2.0.0 and in '/opt/couchdb/etc/local.d/local.ini' I have the following:
> {quote}
> ; CouchDB Configuration Settings
> ; Custom settings should be made in this file. They will override settings
> ; in default.ini, but unlike changes made to default.ini, this file won't be
> ; overwritten on server upgrade.
> [chttpd]
> bind_address = any
> [couchdb]
> uuid = e5675a08388ac8563d4b8e8d46e96d42
> [httpd]
> enable_cors = true
> [cors]
> origins = *
> methods = GET, POST, PUT, DELETE, OPTIONS
> {quote}
> The documentation indicates that 'cors/methods' is used to control which HTTP methods will be accepted: http://docs.couchdb.org/en/2.0.0/config/http.html?highlight=enable_cors#cors/methods
> However when I make an OPTIONS request I receive '405 Method Not Allowed' as a response. Additionally the response contains the following in it's headers:
> {quote}
> Allow:DELETE,GET,HEAD,POST,PUT,COPY
> {quote}
> Which seems to indicate that my configuration is not being used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)