couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chewbra...@apache.org
Subject [41/41] chttpd commit: updated refs/heads/2080-port-cors to e2c2bd7
Date Tue, 02 Jun 2015 19:31:31 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/e2c2bd7b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/e2c2bd7b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/e2c2bd7b

Branch: refs/heads/2080-port-cors
Commit: e2c2bd7ba4ef3124c1f4fae6d30748764fd4271c
Parents: 3cf2b46
Author: Russell Branca <chewbranca@apache.org>
Authored: Thu Nov 6 14:48:51 2014 -0800
Committer: Russell Branca <chewbranca@apache.org>
Committed: Tue Jun 2 19:30:33 2015 +0000

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


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/e2c2bd7b/src/chttpd_cors.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_cors.erl b/src/chttpd_cors.erl
index e0e8fd0..b109b45 100644
--- a/src/chttpd_cors.erl
+++ b/src/chttpd_cors.erl
@@ -288,6 +288,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