ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
11.24k stars 955 forks source link

fix(http): prevent POST request from being proxied #7395

Closed jcesarmobile closed 1 month ago

jcesarmobile commented 1 month ago

In some cases options?.method is undefined for POST requests, so the request is being proxied, but the proxy can't handle POST data, so the data is lost.

Instead of checking options?.method, check the request's method, which seems to always be defined.

closes https://github.com/ionic-team/capacitor/issues/7391