Git Product home page Git Product logo

Comments (6)

manucorporat avatar manucorporat commented on May 18, 2024

why not to use the http Cordova repo?

from cordova-plugin-ionic-webview.

troyanskiy avatar troyanskiy commented on May 18, 2024

@manucorporat Sorry, I did not get about what are you talking.

from cordova-plugin-ionic-webview.

troyanskiy avatar troyanskiy commented on May 18, 2024

@manucorporat
If you are talking about https://github.com/silkimen/cordova-plugin-advanced-http than it's not a problem to use that on the app.
But in case of app which is used as an app (on device) and a website (in browser) then need to implement something like (which is the case now for all my apps)

if (isApp) {
// make a call with HTTP native plugin
} else {
// make a call with angular Http
}

And it's not really convenient.

from cordova-plugin-ionic-webview.

manucorporat avatar manucorporat commented on May 18, 2024

doesn't your idea have the same problem?

from cordova-plugin-ionic-webview.

troyanskiy avatar troyanskiy commented on May 18, 2024

Nope.
Since we are calling /api/... (by angular http) on the app it will call http://localhost:8080/api/... (coz index.html is loaded from http://localhost:8080/index.html) and redirected to https://my-server.com/api and on the web it will call http://my-server.com/api (coz index.html is loaded from http://my-server.com/index.html) .
Then on the server, it's a role of the web server to forward requests /api to the back end.

from cordova-plugin-ionic-webview.

manucorporat avatar manucorporat commented on May 18, 2024

It is very unlikely this will be ever be part of this repo, since it is not related with WK stuff or the app correctly, but a specific limitation of not implementing CORS.

I would suggest to look or create a new cordova plugin that only implements the proxy feature. I would be happy to add it to this section in the docs: https://ionicframework.com/docs/wkwebview/#i-cant-implement-cors

from cordova-plugin-ionic-webview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.