Open kobisamoray opened 4 years ago
You have to use proper proxy, not redirection.
@tananaev I didn't explain my problem very well. Our Apache configuration is as described here: https://www.traccar.org/secure-connection/
So HTTPS listener is proxying the SSL requests locally to Traccar server as you advise. Additionally we have a redirector for non-secure requests from the HTTP outbound listener, to the HTTPS listener.
We do have users who their apps are configured to use the HTTP listener, but the Android app fails to follow the redirector and fails with an error instead. The iOS app behaves well in that case.
If you proxied everything correctly and you have a valid SSL certificate, there should be no issues.
SSL Cert is not the issue is this works in both iPhone and in a browser (including Android's). Tried debugging this a bit: seems like the following line receives the 302 message instead of the JSON object: https://github.com/traccar/traccar-manager-android/blob/master/app/src/main/java/org/traccar/manager/StartFragment.java#L80
That makes sense, as I guess that HttpURLConnection doesn't recourse the request while receiving 302
So you are using redirect. Just use correct URL from the beginning.
We have configured a HTTPS forwarder for our Traccar server. While configuring Traccar Manager for Android URL upon first execution, configuring the HTTPS URL works. However, configuring the HTTP URL, while relying on redirection by the HTTPS forwarder, results with a server error. Same configuration with the iPhone Traccar Manager app works well. Specifying the HTTP URL in Chrome for Android obviously works.