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 c93846a
Date Thu, 06 Nov 2014 22:55:23 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/c93846a7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/c93846a7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/c93846a7

Branch: refs/heads/2080-port-cors
Commit: c93846a7e50a7d290062daaa167f5b5c9e558d7f
Parents: 7c9fbe6
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 14:48:51 2014 -0800

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


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