feat: Update manifest
All checks were successful
Build Docker / BuildImage (push) Successful in 52s

This commit is contained in:
2025-01-29 18:41:13 +11:00
parent 622a4038ac
commit d4136a396a
2 changed files with 35 additions and 7 deletions

View File

@@ -235,16 +235,18 @@ def xrpLedger():
@app.route("/manifest.json")
def manifest():
host = request.host
if host == "nathan.woodburn.au":
return send_from_directory("templates", "manifest.json")
# Read as json
with open("templates/manifest.json") as file:
with open("manifest.json") as file:
manifest = json.load(file)
if host != "localhost:5000" and host != "127.0.0.1:5000":
manifest["start_url"] = f"https://{host}/"
else:
manifest["start_url"] = "http://127.0.0.1:5000/"
url = f"https://{host}"
if host == "localhost:5000" or host == "127.0.0.1:5000":
url = "http://127.0.0.1:5000"
manifest["start_url"] = url
manifest["scope"] = url
return jsonify(manifest)