You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/07/07 22:30:06 UTC

couch commit: updated refs/heads/master to 8675de9

Repository: couchdb-couch
Updated Branches:
  refs/heads/master c10fe5edf -> 8675de9fc


Fix inadvertent reintroduction of couch_config calls


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/8675de9f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/8675de9f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/8675de9f

Branch: refs/heads/master
Commit: 8675de9fc3f50e4804c62113dd90689bbea1c224
Parents: c10fe5e
Author: Robert Newson <rn...@apache.org>
Authored: Mon Jul 7 21:28:22 2014 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Mon Jul 7 21:28:22 2014 +0100

----------------------------------------------------------------------
 src/couch_httpd_misc_handlers.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/8675de9f/src/couch_httpd_misc_handlers.erl
----------------------------------------------------------------------
diff --git a/src/couch_httpd_misc_handlers.erl b/src/couch_httpd_misc_handlers.erl
index a49572b..8101cdf 100644
--- a/src/couch_httpd_misc_handlers.erl
+++ b/src/couch_httpd_misc_handlers.erl
@@ -69,7 +69,7 @@ handle_utils_dir_req(#httpd{method='GET'}=Req, DocumentRoot) ->
     {_ActionKey, "/", RelativePath} ->
         % GET /_utils/path or GET /_utils/
         CachingHeaders = [{"Cache-Control", "private, must-revalidate"}],
-        EnableCsp = couch_config:get("csp", "enable", "false"),
+        EnableCsp = config:get("csp", "enable", "false"),
         Headers = maybe_add_csp_headers(CachingHeaders, EnableCsp),
         couch_httpd:serve_file(Req, RelativePath, DocumentRoot, Headers);
     {_ActionKey, "", _RelativePath} ->
@@ -83,7 +83,7 @@ handle_utils_dir_req(Req, _) ->
 maybe_add_csp_headers(Headers, "true") ->
     DefaultValues = "default-src 'self'; img-src 'self'; font-src 'self'; "
                     "script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline';",
-    Value = couch_config:get("csp", "header_value", DefaultValues),
+    Value = config:get("csp", "header_value", DefaultValues),
     [{"Content-Security-Policy", Value} | Headers];
 maybe_add_csp_headers(Headers, _) ->
     Headers.