Skip to content

Commit

Permalink
Use .lower() when accessing the cache busting map
Browse files Browse the repository at this point in the history
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 #1142
  • Loading branch information
benbusby committed Sep 30, 2024
1 parent 5eb609d commit c056322
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
# 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)
Expand Down

0 comments on commit c056322

Please sign in to comment.