Search code examples
cordovahttpcordova-plugins

Cordova plugin to intercept HTTP(S) traffic


I would like to be able to intercept HTTP requests made inside a Cordova app (eg: when navigating in an iframe) and eventually modify it or amend the response from the code.

Is there any Cordova plugin that would allow that? Is this at least technically possible (Android and iOS at least)?


Solution

  • The best option to amend the response or the headers is to handle them on the server side rather than handling the same in client side(in mobile app) as far as i know.

    The most convincing reason for this approach is to avoid possible security vulnerabilities like MITM attacks. It's more secured to fiddle the response in server side. Request you to rethink your approach unless you have a strong need to handle this on client side(in mobile app)