HAproxy is not forwarding request from http to https while using curl through command line
<p>I have configured HAProxy.This will redirect certain domain from http to https through browser. And it satisfy all my requirement through browser. </p>

<p>But when i try to use the api through curl(command line) it is not working when i use http://

<p>Here is doubt is how i can redirect all curl or command line request which is http to https. Here is the output when i tried to use http curl.</p>

<pre><code>$ curl -s -v  -u $USER:$PASS -X GET -H "Content-Type: application/json" http://&lt;IP&gt;/rest/api/2/project/
*   Trying 192.168.1.21...
* Connected to test-jira.example.com (192.168.1.21) port 80 (#0)
* Server auth using Basic with user 'prash.castlestreet'
GET /rest/api/2/project/ HTTP/1.1
Host: prash.castlestreet.example.com
Authorization: Basic cHJhZGVlcC5jaGVydXRodWRpeWlsZ2lyaWphdmFsbGFiaGFuOlZlcml6b24h
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/json

HTTP/1.1 302 Found
Cache-Control: no-cache
Content-length: 0
Location: https://prash.castlestreet.example.com/rest/api/2/project/
Connection: close

Closing connection 0
</code></pre>

<p>Thanks,
Prash</p>