GitHub user chewbranca opened a pull request:
https://github.com/apache/couchdb-chttpd/pull/8
2080 port cors
This brings in support for CORS into `chttpd` itself. It is based off of
the `couch_httpd_cors` implementation and is a sizable refactor that cleans up
a number of things and also makes the core functionality completely pure. The
only IO is performed in `chttpd_cors:maybe_handle_preflight_request/1` and
`chttpd_cors:headers/2` which both call `get_cors_config/1`. The function
`get_cors_config` loads the server wide CORS settings and then passes that
through the rest of the module. We can then test all the functionality of the
module directly without needing to do any test bed server loading or module
level mocking.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/couchdb-chttpd 2080-port-cors
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-chttpd/pull/8.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #8
----
commit cf7873d04c0b33b3acf88e5a7d84aae0e6fe94ed
Author: Russell Branca <[email protected]>
Date: 2014-11-05T00:07:38Z
CORS implementation for chttpd
commit 7ac7cc06fb6fb8bc090ae50c0ee7c1e2f4e847d2
Author: Russell Branca <[email protected]>
Date: 2014-11-06T22:48:51Z
Disable couch_httpd_cors when chttpd_cors is active
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---