-
Notifications
You must be signed in to change notification settings - Fork 133
Multiple Proxies Support #414
Comments
@danielbrutti, that does look neat! Would very much like to see your implementation. |
@danielbrutti! Still wouldn't mind implementing this if you show us your implementation here or submit a PR. Let me know what you think! |
@gruppjo the easiest solution is to use
inside
and then
Then, having this done - you may call any REST like:
where |
@lsntomaszw That looks nice! I'll see if we can get it upstream soon |
@gruppjo cool. I guess that the sam incjection of code shoud be made in With the injected code you may use:
and works like a charm |
@gruppjo .. and what is more - |
Hi everyone.. want to apologize I couldn't work on this before.. were hard weeks on work. I share my code over here in case you still want to use it.. I have time to do a PR now in case you still want to use it. JSON for proxies configuration (under root folder)
Modifications on gulp/watching.js
|
will be in the next release. Thanks for your input @danielbrutti, @lsntomaszw :) |
I'm adding up a simplest method for using multiple proxies. Just use app/main/constants/env-dev.json to define proxies i.e. { if you are having multiple servers and you want to fix any of them for development mode, you can define your server type also i.e. { After this, define "icloud / mcloud / tcloud / qcloud" proxies in your apache server as generator-m-ionic uses apache server to serve I'm using xampp for cross plat-form, which comes with apache. Final step |
Hi @siddharthshobhit, thanks for sharing your clever solution! The current version of the generator (1.10) supports multiple proxies with a built-in feature. You can see how it works, here: https://github.com/mwaylabs/generator-m-ionic/blob/master/docs/guides/cors_proxy.md#built-in-multiple-proxies |
Hi,
I'm developing an app and found the need of have multiple proxy paths configured in the application. In my case I need 2 base urls
/oauth
and/api
. And I can't just proxy to/
since it will redirect to the web application running on tomcat.I just did modifications on
watching.js
file in order to define multiple proxies ifproxyConfig
option is configured, which is a json file. With this modification you need to:proxy.config.json
file in root (or whatever you want) and define proxies there.gulp watch --no-open --proxyConfig=proxy.config.json
The console output will look like:
I can share the code if you think will be useful for other developers.
Best,
Daniel
The text was updated successfully, but these errors were encountered: