我已經設置了nginx的爲HTTP流量重定向到HTTPS是這樣的:瞭解NGINX HTTP到HTTPS重定向
server {
listen 80;
server_name git.mydomain.it;
return 301 https://$host$request_uri;
}
我可以通過HTTPS和HTTP連接成功。
當我做git clone http://git.mydomain.it/oznt/tracker.git
我被系統提示正確的網址:
$ git clone http://git.mydomain.it/oznt/tracker.git
Cloning into 'tracker'...
Username for 'https://git.mydomain.it':
到目前爲止好。 但我想知道當我輸入密碼時會發生什麼。是否 受保護,就好像我直接連接到https://git.mydomain.it
或者它是否首先通過明文傳輸到HTTP終點然後重定向?
在這裏找到我的答案http://stackoverflow.com/questions/40957699/does-http-redirect-to-https-risk-capture-of-password – Oz123
我不認爲這會回答你的問題,但你知道這個問題比我好。 ;) –