mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-06-06 03:05:35 +00:00
comment out compression code
This commit is contained in:
parent
4a83fbcf2b
commit
cd3352e66c
@ -1,3 +1,5 @@
|
||||
LABEL org.opencontainers.image.description Removes client files compressions to fix plank page on safari
|
||||
|
||||
FROM ubuntu:latest
|
||||
|
||||
WORKDIR /
|
||||
|
23
manage.py
23
manage.py
@ -45,19 +45,20 @@ def serve_client_files(path: str):
|
||||
"""
|
||||
Serves the static files in the client folder.
|
||||
"""
|
||||
js_or_css = path.endswith(".js") or path.endswith(".css")
|
||||
if not js_or_css:
|
||||
return app.send_static_file(path)
|
||||
# js_or_css = path.endswith(".js") or path.endswith(".css")
|
||||
# if not js_or_css:
|
||||
# return app.send_static_file(path)
|
||||
|
||||
gzipped_path = path + ".gz"
|
||||
# gzipped_path = path + ".gz"
|
||||
|
||||
if request.headers.get("Accept-Encoding", "").find("gzip") >= 0:
|
||||
if os.path.exists(os.path.join(app.static_folder, gzipped_path)):
|
||||
response = app.make_response(app.send_static_file(gzipped_path))
|
||||
response.headers["Content-Encoding"] = "gzip"
|
||||
return response
|
||||
else:
|
||||
return app.send_static_file(path)
|
||||
# if request.headers.get("Accept-Encoding", "").find("gzip") >= 0:
|
||||
# if os.path.exists(os.path.join(app.static_folder, gzipped_path)):
|
||||
# response = app.make_response(app.send_static_file(gzipped_path))
|
||||
# response.headers["Content-Encoding"] = "gzip"
|
||||
# return response
|
||||
# else:
|
||||
# return app.send_static_file(path)
|
||||
return app.send_static_file(path)
|
||||
|
||||
|
||||
@app.route("/")
|
||||
|
Loading…
x
Reference in New Issue
Block a user