mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
fix(dsh-plugin-browserskill): prefix routes register without a trailing slash
The webserver prefix matcher joins prefix + '/', so a registered '/bsk-observation/thumbnail/' never matched real paths.
This commit is contained in:
@@ -115,7 +115,7 @@ export function registerObservationRoutes(
|
|||||||
}),
|
}),
|
||||||
webServer.register({
|
webServer.register({
|
||||||
kind: "prefix",
|
kind: "prefix",
|
||||||
path: `${ROUTE_BASE}/thumbnail/`,
|
path: `${ROUTE_BASE}/thumbnail`,
|
||||||
handler: async (req, res) => {
|
handler: async (req, res) => {
|
||||||
if (req.method !== "GET") {
|
if (req.method !== "GET") {
|
||||||
sendJson(res, 405, { error: "method not allowed" });
|
sendJson(res, 405, { error: "method not allowed" });
|
||||||
|
|||||||
Reference in New Issue
Block a user