Whitelist .log.gz files from the passthrough
Currently, files with extension .log.gz are not exempt from the passthrough filter and will be downloaded by the browser instead of formatted for viewing in the browser. Since some log files in stable releases use .log for the extension, it's useful to whitelist these files when served up for log analyzation. Change-Id: I3d391167bbc3e3b8a4fffd368a0a16f944f548ca
This commit is contained in:
parent
5828d818ed
commit
c4a1cf8f46
|
@ -104,7 +104,7 @@ def use_passthrough_view(file_headers):
|
|||
# download.
|
||||
filename = file_headers['filename']
|
||||
filename = filename[:-3] if filename[-3:] == '.gz' else filename
|
||||
if os.path.splitext(filename)[1] in ['.txt', '.html']:
|
||||
if os.path.splitext(filename)[1] in ['.txt', '.html', '.log']:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in New Issue