fix: use regex route pattern to match encoded userdata URLs

The storeUserData API encodes the full path as a single URL component,
producing URLs like /api/userdata/workflows%2Ffile.json. Glob patterns
don't match %2F reliably, so use a regex pattern instead.
This commit is contained in:
bymyself
2026-03-30 17:40:29 -07:00
parent c58d63c793
commit 295b8d8afb

View File

@@ -123,7 +123,7 @@ async function saveAndWait(
// shared backend) and auth-related timing issues in cloud mode's fetchApi().
const filename = workflowName + (workflowName.endsWith('.json') ? '' : '.json')
await comfyPage.page.route(
`**/api/userdata/workflows/${encodeURIComponent(filename)}*`,
/\/api\/userdata\/workflows(%2F|\/).*$/,
async (route) => {
if (route.request().method() === 'POST') {
await route.fulfill({