Skip to content

Commit d222ad0

Browse files
committed
Improve Weblate URL validation
1 parent 4b491f9 commit d222ad0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

express/backend/src/api/weblate-proxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ router.get<any>("/api/weblate/*", async function (req, res) {
1616
const url = new URL(`${WEBLATE_API}${userPath}`);
1717
const q = req.query;
1818
if (q.page) {
19-
url.searchParams.set("page", q.page as string);
19+
url.searchParams.set("page", Number(q.page).toString());
2020
}
2121

2222
const result = await axios.get<any>(url.toString(), {

0 commit comments

Comments
 (0)