Mercurial > hg
changeset 34605:625202a44d88
configitems: register the 'web.cache' config
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 11 Oct 2017 04:14:33 +0200 |
parents | dcd6b6625e98 |
children | db935a5ea364 |
files | mercurial/configitems.py mercurial/hgweb/hgweb_mod.py |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/configitems.py Wed Oct 11 04:14:14 2017 +0200 +++ b/mercurial/configitems.py Wed Oct 11 04:14:33 2017 +0200 @@ -727,6 +727,9 @@ coreconfigitem('web', 'allowzip', default=None, ) +coreconfigitem('web', 'cache', + default=True, +) coreconfigitem('web', 'accesslog', default='-', )
--- a/mercurial/hgweb/hgweb_mod.py Wed Oct 11 04:14:14 2017 +0200 +++ b/mercurial/hgweb/hgweb_mod.py Wed Oct 11 04:14:33 2017 +0200 @@ -436,7 +436,7 @@ # Don't enable caching if using a CSP nonce because then it wouldn't # be a nonce. - if rctx.configbool('web', 'cache', True) and not rctx.nonce: + if rctx.configbool('web', 'cache') and not rctx.nonce: caching(self, req) # sets ETag header or raises NOT_MODIFIED if cmd not in webcommands.__all__: msg = 'no such method: %s' % cmd