ionic framework - Cordova or Phonegap Http Requests and Same Origin Policy Problems -


as many others have problem restful service calling.

this service many others has origin check. using cordova & ionic doing request android app set origin file:// browser cors check not service, doesn't allow schema origin. others allow empty origin or same origin.

on many posts read wrote can handle whitelist plugin or csp. think absolutly incorrect. whitelist can not work on origin header , csp has nothing it.

so last few days spend hundreds of hours , googled , tested different solutions , different plugins. solution not there , not simple.

at moment i'm testing cordova plugins http , websocket requests, native http , websocket calls, working great sop problem there problems cookies. tryied found solution on custom webview can elimante origin header request difficult us.

can on problem?

i'm not guy has call sop protected resource on internet mobile hybrid app. why there no simple solution it?

edit: created issue on cordova https://issues.apache.org/jira/browse/cb-13194

in such case, aren't looking adjust server-side cors handling? i'm sure you've seen in searching, https://enable-cors.org/server.html.

you can't/shouldn't able change origin of request client making request (effectively spoofing). if changing cors settings @ server not option, may need @ proxying requests server control, can added list of allowed origins on target protected resources.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -