couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chewbra...@apache.org
Subject [2/2] chttpd commit: updated refs/heads/2080-port-cors to 345d448
Date Thu, 06 Nov 2014 23:13:06 GMT
Disable couch_httpd_cors when chttpd_cors is active


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/345d448f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/345d448f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/345d448f

Branch: refs/heads/2080-port-cors
Commit: 345d448f009c30dfb0ee727c44668b6f8a45a185
Parents: 0d1938a
Author: Russell Branca <chewbranca@apache.org>
Authored: Thu Nov 6 14:48:51 2014 -0800
Committer: Russell Branca <chewbranca@apache.org>
Committed: Thu Nov 6 15:12:48 2014 -0800

----------------------------------------------------------------------
 src/chttpd_cors.erl | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/345d448f/src/chttpd_cors.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_cors.erl b/src/chttpd_cors.erl
index 65709f2..8ed5b66 100644
--- a/src/chttpd_cors.erl
+++ b/src/chttpd_cors.erl
@@ -283,6 +283,12 @@ get_cors_config(_Req) ->
 
 
 is_cors_enabled(Config) ->
+    case get(disable_couch_httpd_cors) of
+        undefined ->
+            put(disable_couch_httpd_cors, true);
+        _ ->
+            ok
+    end,
     couch_util:get_value(<<"enable_cors">>, Config, false).
 
 


Mime
View raw message