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 7ac7cc0
Date Fri, 07 Nov 2014 22:01:02 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/7ac7cc06
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/7ac7cc06
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/7ac7cc06

Branch: refs/heads/2080-port-cors
Commit: 7ac7cc06fb6fb8bc090ae50c0ee7c1e2f4e847d2
Parents: cf7873d
Author: Russell Branca <chewbranca@apache.org>
Authored: Thu Nov 6 14:48:51 2014 -0800
Committer: Russell Branca <chewbranca@apache.org>
Committed: Fri Nov 7 13:56:31 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/7ac7cc06/src/chttpd_cors.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_cors.erl b/src/chttpd_cors.erl
index e5c1f28..5b705bc 100644
--- a/src/chttpd_cors.erl
+++ b/src/chttpd_cors.erl
@@ -286,6 +286,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