mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-06-07 03:35: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
|
FROM ubuntu:latest
|
||||||
|
|
||||||
WORKDIR /
|
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.
|
Serves the static files in the client folder.
|
||||||
"""
|
"""
|
||||||
js_or_css = path.endswith(".js") or path.endswith(".css")
|
# js_or_css = path.endswith(".js") or path.endswith(".css")
|
||||||
if not js_or_css:
|
# if not js_or_css:
|
||||||
return app.send_static_file(path)
|
# return app.send_static_file(path)
|
||||||
|
|
||||||
gzipped_path = path + ".gz"
|
# gzipped_path = path + ".gz"
|
||||||
|
|
||||||
if request.headers.get("Accept-Encoding", "").find("gzip") >= 0:
|
# if request.headers.get("Accept-Encoding", "").find("gzip") >= 0:
|
||||||
if os.path.exists(os.path.join(app.static_folder, gzipped_path)):
|
# if os.path.exists(os.path.join(app.static_folder, gzipped_path)):
|
||||||
response = app.make_response(app.send_static_file(gzipped_path))
|
# response = app.make_response(app.send_static_file(gzipped_path))
|
||||||
response.headers["Content-Encoding"] = "gzip"
|
# response.headers["Content-Encoding"] = "gzip"
|
||||||
return response
|
# return response
|
||||||
else:
|
# else:
|
||||||
return app.send_static_file(path)
|
# return app.send_static_file(path)
|
||||||
|
return app.send_static_file(path)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user