Repository: couchdb-couch Updated Branches: refs/heads/master d5a3fc2a5 -> 2f14e59ee
change couch_httpd_csrf section to csrf Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/2f14e59e Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/2f14e59e Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/2f14e59e Branch: refs/heads/master Commit: 2f14e59ee74d6afe55f05788c3cf28d362e037af Parents: d5a3fc2 Author: Robert Newson <[email protected]> Authored: Sat Aug 8 13:27:17 2015 +0100 Committer: Robert Newson <[email protected]> Committed: Sat Aug 8 13:27:17 2015 +0100 ---------------------------------------------------------------------- src/couch_httpd_csrf.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/2f14e59e/src/couch_httpd_csrf.erl ---------------------------------------------------------------------- diff --git a/src/couch_httpd_csrf.erl b/src/couch_httpd_csrf.erl index 5f8c708..ab82635 100644 --- a/src/couch_httpd_csrf.erl +++ b/src/couch_httpd_csrf.erl @@ -137,10 +137,10 @@ is_csrf_header(_) -> ensure_csrf_secret() -> - case config:get("couch_httpd_csrf", "secret", undefined) of + case config:get("csrf", "secret", undefined) of undefined -> NewSecret = ?b2l(couch_uuids:random()), - config:set("couch_httpd_csrf", "secret", NewSecret), + config:set("csrf", "secret", NewSecret), NewSecret; Secret -> Secret end. @@ -172,7 +172,7 @@ refresh_cookie({_, Timestamp, _}) -> max_age() -> - config:get_integer("couch_httpd_csrf", "timeout", 3600). + config:get_integer("csrf", "timeout", 3600). timestamp() ->
