Compare commits
No commits in common. "ed7c142521f6f85957efb96b53c6127e1d8b6948" and "cd2592a4b1dd79f9c2d585f821eeec8475afdaa7" have entirely different histories.
ed7c142521
...
cd2592a4b1
2
app.py
2
app.py
@ -783,9 +783,9 @@ def serve_file(subpath):
|
|||||||
user_agent = request.headers.get('User-Agent')
|
user_agent = request.headers.get('User-Agent')
|
||||||
|
|
||||||
# skip logging on cache hits or on audio GETs (per your rules)
|
# skip logging on cache hits or on audio GETs (per your rules)
|
||||||
# Log once per real fetch: skip CDN cache requests and HEADs, log GETs (including audio)
|
|
||||||
do_log = (
|
do_log = (
|
||||||
not is_cache_request # skip if upstream CDN asked us to cache
|
not is_cache_request # skip if upstream CDN asked us to cache
|
||||||
|
and not is_audio_get # skip audio GETs
|
||||||
and request.method != 'HEAD'
|
and request.method != 'HEAD'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user