Use `.lower()` when accessing the cache busting map
Cache busted resources will always have a lowercase name. For some reason, a user encountered a capitalized css file name in #1142. This isn't present anywhere in the Whoogle repo, but could be a byproduct of some self-hosting configuration. Either way, the key used should always be lowercase. Fixes #1142main
parent
5eb609d0b2
commit
c056322037
|
@ -176,7 +176,7 @@ for cb_dir in cache_busting_dirs:
|
|||
# Templating functions
|
||||
app.jinja_env.globals.update(clean_query=clean_query)
|
||||
app.jinja_env.globals.update(
|
||||
cb_url=lambda f: app.config['CACHE_BUSTING_MAP'][f])
|
||||
cb_url=lambda f: app.config['CACHE_BUSTING_MAP'][f.lower()])
|
||||
|
||||
# Attempt to acquire tor identity, to determine if Tor config is available
|
||||
send_tor_signal(Signal.HEARTBEAT)
|
||||
|
|
Loading…
Reference in New Issue