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 25bb07e
Date Wed, 26 Nov 2014 00:13:15 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/25bb07e6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/25bb07e6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/25bb07e6

Branch: refs/heads/2080-port-cors
Commit: 25bb07e62097d43c8d2a23091875e093c236deec
Parents: 9afb448
Author: Russell Branca <chewbranca@apache.org>
Authored: Thu Nov 6 14:48:51 2014 -0800
Committer: Russell Branca <chewbranca@apache.org>
Committed: Tue Nov 25 16:11:03 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/25bb07e6/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