Skip to content

Commit de1765a

Browse files
committed
Raise the default TEXT_RENDER_FILESIZE_LIMIT and allow it to be configured
1 parent c814e5f commit de1765a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pypi_browser/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
ONE_MB = 2**20
3737
ONE_GB = 2**30
3838

39-
TEXT_RENDER_FILESIZE_LIMIT = 50 * ONE_KB
39+
TEXT_RENDER_FILESIZE_LIMIT = int(os.environ.get('PYPI_BROWSER_TEXT_RENDER_FILESIZE_LIMIT', ONE_MB))
4040

4141
# Mime types which are allowed to be presented as detected.
4242
# TODO: I think we actually only need to prevent text/html (and any HTML

0 commit comments

Comments
 (0)