0

I am making my website http to https (using letsencrypt certificate) with redirect from http to https with following:

RewriteEngine on
RewriteCond %{SERVER_NAME} =xyz.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]

I am making http API call to my website url from my android code, but it fails. When i change it to https, only then it succeeds. Why is this happening and is there a way such that http call itself from my android code can succeed.

clint
  • 1,786
  • 4
  • 34
  • 60

1 Answers1

1

My advice:

  • Always specify https in your android code

  • For API, do NOT redirect http->https, but answer an error on the http version, it helps catch security errors faster (with a redirect they could stay undetected)

Tom
  • 4,666
  • 2
  • 29
  • 48