mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user