Polyonic icon indicating copy to clipboard operation
Polyonic copied to clipboard

Ionic Proxy Ignored

Open Rossdex opened this issue 8 years ago • 4 comments
trafficstars

**Polyonic version: v0.3.0

I'm submitting a ... (check one with "x") [x] bug report [ ] feature request

Current behavior: I have an ionic proxy set up in ionic.config.json it is used for when using ionic in a browser, currently Polyonic is ignoring any proxy i put in that file.

If i console log the error i get http://127.0.0.1:3000/proxy/api/v1/auth 404 (Not Found)

If i completely remove my proxy I get a CORS issue caused by running a server locally.

Related code: This is my remote provider

constructor(public http:Http, public platform:Platform, private device:Device) { platform.ready().then(() => { console.log(platform.platforms()); if (this.device.uuid === 'browser') { this.domain = '/proxy'; } }); }

ionic.conifg.json "proxies": [ { "path": "/proxy", "proxyUrl": "http://www.mywebsite.co.uk" } ]

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below): ordova CLI: 6.5.0 Ionic Framework Version: 3.0.1 Ionic CLI Version: 2.2.3 Ionic App Lib Version: 2.2.1 Ionic App Scripts Version: 1.3.0 ios-deploy version: Not installed ios-sim version: Not installed OS: Windows 10 Node Version: v6.10.2 Xcode version: Not installed

Rossdex avatar Apr 27 '17 14:04 Rossdex

Oooh okay. I haven't worked with Ionic Proxies much. I'll try and reproduce locally this weekend and see if we can find a fix.

Thank you for following the bug format! Much appreciated

NorthMcCormick avatar Apr 27 '17 17:04 NorthMcCormick

I also have this issue Is there any update?

matthiscock avatar May 11 '17 12:05 matthiscock

Sorry peeps I've been super slammed. I've got some visibility on this and there were some recent changes to the CLI. I'll be updating these to 3.0+ soonish. (Though PRs are always welcome ;D)

NorthMcCormick avatar May 22 '17 15:05 NorthMcCormick

Thats great news, looking forward to it Sadly I dont know Electron at all, but happy to help in any ways you feel I can We know ionic pretty well.....

Or happy to learn, if you can point us in the right direction etc.

Add me on skype: matt.hiscock as may be able to additional assist in other ways,........

matthiscock avatar May 23 '17 10:05 matthiscock