Using addProxyRule for HTTP

415
4
Jump to solution
10-16-2013 10:31 AM
JamesVillanueva
New Contributor III
I have and HTTPS application. Can I use addProxyRule to specify to use a proxy for HTTP based URLs only?  I don't want to use a proxy for everything due to the fact my local services are relative paths and having them go through the proxy causes them to fail.
0 Kudos
1 Solution

Accepted Solutions
JohnGravois
Frequent Contributor
sounds like you should just be doing your own check on user provided strings and conditionally pass the url to addProxyRule() if it meets your own criteria (ie. 'http://' and not 'https://'.

View solution in original post

0 Kudos
4 Replies
JohnGravois
Frequent Contributor
there is no way to askAddProxyRule to apply only to 'HTTP' requests.  you should always use the same protocol for all requests from an app across the board.
0 Kudos
JamesVillanueva
New Contributor III
That sounds like a great idea in theory, but when you have an application that allows the user add outside data to the map you can't always guarantee the protocol is going to be the same. That's why I am looking for a solution that would allow me to keep same protocol by only using the proxy for data sources that do not match the applications protocol. If you have means to add rules to handle specific sources, why can't it be expanded to handle certain protocols or is there something fundamental I'm missing .
0 Kudos
JohnGravois
Frequent Contributor
sounds like you should just be doing your own check on user provided strings and conditionally pass the url to addProxyRule() if it meets your own criteria (ie. 'http://' and not 'https://'.
0 Kudos
JamesVillanueva
New Contributor III
That's a great idea! Thanks.
0 Kudos