Revert "Test fix - revert if nukes galaxy lol"

This reverts commit f51059956c.
This commit is contained in:
firestarsdog
2026-09-05 22:28:13 -04:00
committed by whoisdomi
parent 547b935e16
commit e16e85d131
2 changed files with 7 additions and 13 deletions
@@ -89,5 +89,11 @@ export function isGalaxyTunnel() {
}
export function galaxyPath(path) {
return path.startsWith("/") ? path : `/${path}`
const suffix = path.startsWith("/") ? path : `/${path}`
if (!isGalaxyTunnel()) return suffix
const firstPathSegment = window.location.pathname.split("/").filter(Boolean)[0] || ""
const slug = /^[A-Za-z0-9]{16}$/.test(firstPathSegment) ? `/${firstPathSegment}` : ""
if (!slug || suffix === slug || suffix.startsWith(`${slug}/`)) return suffix
return `${slug}${suffix}`
}
-12
View File
@@ -5005,18 +5005,6 @@ def setup(app):
@app.errorhandler(404)
def not_found(_):
is_api = (
request.path == "/api"
or "/api/" in request.path
or request.is_json
or (request.accept_mimetypes.accept_json and not request.accept_mimetypes.accept_html)
)
if is_api or request.method not in ("GET", "HEAD"):
return jsonify({"error": "Not found"}), 404
if request.path.startswith(("/assets/", "/screen_recordings/", "/thumbnails/", "/video/")):
return "Not found", 404
response = make_response(render_template("index.html"))
response.headers["Cache-Control"] = "no-store, no-cache, must-revalidate, max-age=0"
response.headers["Pragma"] = "no-cache"