Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gedysintraware/cordova-plugin-webview-proxy
Plugin to proxy requests through the webview
https://github.com/gedysintraware/cordova-plugin-webview-proxy
cookies cordova cordova-ios cors proxy wkwebview
Last synced: about 1 month ago
JSON representation
Plugin to proxy requests through the webview
- Host: GitHub
- URL: https://github.com/gedysintraware/cordova-plugin-webview-proxy
- Owner: GEDYSIntraWare
- License: mit
- Created: 2020-11-24T16:30:30.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-01T13:47:52.000Z (7 months ago)
- Last Synced: 2024-12-19T23:14:54.544Z (about 1 month ago)
- Topics: cookies, cordova, cordova-ios, cors, proxy, wkwebview
- Language: Objective-C
- Homepage: https://www.npmjs.com/package/cordova-plugin-webview-proxy
- Size: 30.3 KB
- Stars: 21
- Watchers: 3
- Forks: 13
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cordova-plugin-webview-proxy
> Work in progress plugin.
## Cordova Plugin to proxy http(s) requests on iOS without CORS and Cookie restrictionsWith this plugin you can do requests to remote servers just like you would do normally. Cookies and CORS restrictions don't apply here because the requests is performed by native code.
You just need to change the URL:
```javascript
const response = await fetch(window.WebviewProxy.convertProxyUrl(url));
console.debug(response);
```#### To delete all Cookies use this:
```javascript
window.WebviewProxy.clearCookie();
```# Make sure you are using a custom scheme with your iOS platform
This plugin uses the WKURLSchemeHandler provided by WKWebView. It requires the latest version of cordova-ios.
**You enable the custom scheme by setting these preferences in config.xml**
```xml
```
# Testing this plugin[This test app](https://github.com/NiklasMerz/cors-cookie-proxy-test-app) with custom pages and a simple backend is helpful for testing and developing this plugin.