Commit 451b0c0
埃博拉酱
fix: route plugin API requests through native HTTP
Work around the plugin API CORS mismatch seen in the Android WebView. The upstream API currently responds with Access-Control-Allow-Origin: https://localhost while the app runs from http://localhost, which causes fetch-based plugin requests to fail even though the API is reachable.
Add helpers.requestJson() so remote JSON requests prefer cordova-plugin-advanced-http instead of a fetch fallback. For the plugin API workload the bridge overhead is negligible compared with network latency, while the native path avoids the WebView CORS policy mismatch entirely.
Update checkAPIStatus() to use the shared helper, await the async API status check in the sidebar extension panel, encode plugin search queries, and route plugin list, search, explore, and filtered requests in both plugin entry points through the shared JSON helper.1 parent 6b24251 commit 451b0c0
File tree
3 files changed
+45
-29
lines changed- src
- pages/plugins
- sidebarApps/extensions
- utils
3 files changed
+45
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
344 | 348 | | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
| 349 | + | |
349 | 350 | | |
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
353 | | - | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
| 424 | + | |
425 | 425 | | |
426 | | - | |
| 426 | + | |
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | | - | |
| 432 | + | |
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
439 | 438 | | |
440 | 439 | | |
441 | 440 | | |
| |||
470 | 469 | | |
471 | 470 | | |
472 | 471 | | |
473 | | - | |
| 472 | + | |
474 | 473 | | |
475 | 474 | | |
476 | | - | |
477 | 475 | | |
478 | 476 | | |
479 | 477 | | |
| |||
567 | 565 | | |
568 | 566 | | |
569 | 567 | | |
570 | | - | |
| 568 | + | |
571 | 569 | | |
572 | 570 | | |
573 | | - | |
574 | 571 | | |
575 | 572 | | |
576 | 573 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
154 | 153 | | |
155 | 154 | | |
156 | 155 | | |
| |||
218 | 217 | | |
219 | 218 | | |
220 | 219 | | |
221 | | - | |
| 220 | + | |
222 | 221 | | |
223 | 222 | | |
224 | 223 | | |
| |||
228 | 227 | | |
229 | 228 | | |
230 | 229 | | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | | - | |
| 412 | + | |
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
| 423 | + | |
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
429 | 428 | | |
430 | 429 | | |
431 | 430 | | |
| |||
463 | 462 | | |
464 | 463 | | |
465 | 464 | | |
466 | | - | |
| 465 | + | |
467 | 466 | | |
468 | | - | |
| 467 | + | |
469 | 468 | | |
470 | 469 | | |
471 | 470 | | |
472 | 471 | | |
473 | 472 | | |
474 | | - | |
| 473 | + | |
475 | 474 | | |
476 | 475 | | |
477 | 476 | | |
478 | 477 | | |
479 | 478 | | |
480 | | - | |
481 | 479 | | |
482 | 480 | | |
483 | 481 | | |
| |||
512 | 510 | | |
513 | 511 | | |
514 | 512 | | |
515 | | - | |
| 513 | + | |
516 | 514 | | |
517 | 515 | | |
518 | 516 | | |
519 | 517 | | |
520 | | - | |
521 | 518 | | |
522 | 519 | | |
523 | 520 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
347 | 368 | | |
| 369 | + | |
348 | 370 | | |
349 | | - | |
| 371 | + | |
350 | 372 | | |
351 | 373 | | |
352 | 374 | | |
| |||
0 commit comments