chabu
chabu

Reputation: 121

Volley android http to https redirect

In my android app I'm using volley android library to fetch data from my web server. Currently I have insecure(no ssl) http server. So I'm making requests using URL "http://www.example.com".

Now I'm planning to add ssl to my server. So my server address is going to change(redirect) to "https://www.example.com". I will update my current app to use HTTPS, however my old app that users are already using, will still be using HTTP URLs. As far as I know, volley android does not handle redirects. So I wonder how am I going to not break old android app, while redirecting http to https.

Update: As mentioned in the comments, this question is more likely asking for a backward compatibility(not breaking old app with http url) solution. Hence, I believe this question is different than Android volley to handle redirect

Upvotes: 1

Views: 1374

Answers (1)

chabu
chabu

Reputation: 121

Since, I did not receive any answer to this question, I went ahead with my own approach. The approach I took is - in my proxy server I redirected all the traffic to https, except the traffic coming from the android app(The android app traffic has unique user agent). This way old users will continue using app uninterrupted. The new users will use updated app, where I'm pointing to https. Hence, over time, my all users will be on https.

Upvotes: 1

Related Questions