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))
|
||||
|
||||
@@ -122,4 +122,10 @@ def sol_donate_post(amount):
|
||||
return jsonify({"message": "Error: Amount too small"}), 400, SOLANA_HEADERS
|
||||
|
||||
transaction = create_transaction(sender, amount)
|
||||
return jsonify({"message": "Success", "transaction": transaction}), 200, SOLANA_HEADERS
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user