mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-10-28 13:21:15 +00:00
comment out compression code
This commit is contained in:
1 parent
4a83fbcf2b
commit
cd3352e66c
2 files changed
+13
-10
No files matched your search
@@ -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 /
|
||||||
|
|||||||
@@ -45,18 +45,19 @@ 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)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user