fix(kobo): add catch-all route for proxying unknown product endpoints
The Kobo store proxy feature was failing with 404 errors for certain store endpoints (e.g., /v1/products/featuredforkoboplus/) because Flask's routing couldn't match these paths. This prevented the Discover tab from working when "Proxy unknown requests to Kobo Store" was enabled. Added catch-all routes using Flask's path converter to match any /v1/products/* paths not handled by more specific routes, allowing the proxy logic to properly redirect these requests to the official Kobo store API.
This commit is contained in:
@@ -1014,6 +1014,8 @@ def handle_getests():
|
||||
@kobo.route("/v1/products/dailydeal", methods=["GET", "POST"])
|
||||
@kobo.route("/v1/products/deals", methods=["GET", "POST"])
|
||||
@kobo.route("/v1/products", methods=["GET", "POST"])
|
||||
@kobo.route("/v1/products/<path:dummy>", methods=["GET", "POST"])
|
||||
@kobo.route("/v1/products/<path:dummy>/", methods=["GET", "POST"])
|
||||
@kobo.route("/v1/affiliate", methods=["GET", "POST"])
|
||||
@kobo.route("/v1/deals", methods=["GET", "POST"])
|
||||
def HandleProductsRequest(dummy=None):
|
||||
|
||||
Reference in New Issue
Block a user