fix: Remove strict slashes from index routes
All checks were successful
Build Docker / BuildImage (push) Successful in 48s
All checks were successful
Build Docker / BuildImage (push) Successful in 48s
This commit is contained in:
@@ -30,7 +30,7 @@ if 'time-zone' not in NC_CONFIG:
|
||||
NC_CONFIG['time-zone'] = 10
|
||||
|
||||
|
||||
@app.route("/")
|
||||
@app.route("/", strict_slashes=False)
|
||||
@app.route("/help")
|
||||
def help():
|
||||
"""Provide API documentation and help."""
|
||||
|
||||
@@ -108,7 +108,7 @@ def render_home(handshake_scripts: str | None = None):
|
||||
)
|
||||
|
||||
|
||||
@app.route("/")
|
||||
@app.route("/", strict_slashes=False)
|
||||
def index():
|
||||
if not isCLI(request):
|
||||
return render_home(handshake_scripts=getHandshakeScript(request.host))
|
||||
|
||||
@@ -123,3 +123,9 @@ def sol_donate_post(amount):
|
||||
|
||||
transaction = create_transaction(sender, amount)
|
||||
return jsonify({"message": "Success", "transaction": transaction}), 200, SOLANA_HEADERS
|
||||
|
||||
@app.route("/actions.json")
|
||||
def sol_actions():
|
||||
return jsonify(
|
||||
{"rules": [{"pathPattern": "/donate**", "apiPath": "/api/v1/donate**"}]}
|
||||
)
|
||||
|
||||
@@ -89,7 +89,7 @@ def callback():
|
||||
print("Refresh Token:", REFRESH_TOKEN)
|
||||
return redirect(url_for("spotify.currently_playing"))
|
||||
|
||||
@app.route("/")
|
||||
@app.route("/", strict_slashes=False)
|
||||
@app.route("/playing")
|
||||
def currently_playing():
|
||||
"""Public endpoint showing your current track."""
|
||||
|
||||
@@ -4,6 +4,6 @@ from tools import json_response
|
||||
app = Blueprint('template', __name__)
|
||||
|
||||
|
||||
@app.route("/")
|
||||
@app.route("/", strict_slashes=False)
|
||||
def index():
|
||||
return json_response(request, "Success", 200)
|
||||
@@ -1,4 +1,5 @@
|
||||
from flask import Blueprint, render_template, make_response, request, jsonify, send_from_directory, redirect
|
||||
from flask import Blueprint, make_response, request, jsonify, send_from_directory, redirect
|
||||
from tools import error_response
|
||||
import os
|
||||
|
||||
app = Blueprint('well-known', __name__, url_prefix='/.well-known')
|
||||
@@ -25,7 +26,7 @@ def wallets(path):
|
||||
if os.path.isfile(".well-known/wallets/" + path.upper()):
|
||||
return redirect("/.well-known/wallets/" + path.upper(), code=302)
|
||||
|
||||
return render_template("404.html"), 404
|
||||
return error_response(request)
|
||||
|
||||
|
||||
@app.route("/nostr.json")
|
||||
|
||||
@@ -179,7 +179,6 @@ def serviceWorker():
|
||||
|
||||
# region Misc routes
|
||||
|
||||
|
||||
@app.route("/meet")
|
||||
@app.route("/meeting")
|
||||
@app.route("/appointment")
|
||||
@@ -203,13 +202,6 @@ def api_legacy(function):
|
||||
return redirect(f"/api/v1/{function}", code=301)
|
||||
return error_response(request, message="404 Not Found", code=404)
|
||||
|
||||
|
||||
@app.route("/actions.json")
|
||||
def sol_actions():
|
||||
return jsonify(
|
||||
{"rules": [{"pathPattern": "/donate**", "apiPath": "/api/v1/donate**"}]}
|
||||
)
|
||||
|
||||
# endregion
|
||||
|
||||
# region Main routes
|
||||
|
||||
@@ -9,7 +9,7 @@ Contact [/contact]
|
||||
Projects [/projects]
|
||||
Tools [/tools]
|
||||
Donate [/donate]
|
||||
API [/api/v1/]
|
||||
API [/api/v1]
|
||||
|
||||
[1;36m───────────────────────────────────────────────[0m
|
||||
[1;36m ABOUT ME [0m
|
||||
|
||||
Reference in New Issue
Block a user