From 654095054f86dfc39a3152810b8d5f354b53fb81 Mon Sep 17 00:00:00 2001 From: Aljosa Asanovic Date: Sun, 2 Nov 2025 13:10:25 -0500 Subject: [PATCH] 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. --- cps/kobo.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cps/kobo.py b/cps/kobo.py index fabd05059..879e18f15 100644 --- a/cps/kobo.py +++ b/cps/kobo.py @@ -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/", methods=["GET", "POST"]) +@kobo.route("/v1/products//", methods=["GET", "POST"]) @kobo.route("/v1/affiliate", methods=["GET", "POST"]) @kobo.route("/v1/deals", methods=["GET", "POST"]) def HandleProductsRequest(dummy=None):