mirror of
https://git.ari.lt/ari.lt/ari.lt.git
synced 2025-02-05 01:59:25 +01:00
don't minify html
Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
parent
0be390fdec
commit
56a4297bda
1 changed files with 1 additions and 9 deletions
|
@ -22,12 +22,6 @@ def min_css(css: str) -> str:
|
|||
return web_mini.css.minify_css(css)
|
||||
|
||||
|
||||
@lru_cache(maxsize=64)
|
||||
def min_html(html: str) -> str:
|
||||
"""minify html"""
|
||||
return web_mini.html.minify_html(html)
|
||||
|
||||
|
||||
def create_app(name: str) -> flask.Flask:
|
||||
"""create ari.lt app"""
|
||||
|
||||
|
@ -100,9 +94,7 @@ def create_app(name: str) -> flask.Flask:
|
|||
if response.direct_passthrough:
|
||||
return response
|
||||
|
||||
if response.content_type == "text/html; charset=utf-8":
|
||||
minified_data: str = min_html(response.get_data(as_text=True))
|
||||
elif response.content_type == "text/css; charset=utf-8":
|
||||
if response.content_type == "text/css; charset=utf-8":
|
||||
minified_data: str = min_css(response.get_data(as_text=True))
|
||||
else:
|
||||
return response
|
||||
|
|
Loading…
Add table
Reference in a new issue