鍍金池/ 問答/Java/ Nginx 使用https代理Spring boot出現(xiàn)總是跳轉(zhuǎn)到http

Nginx 使用https代理Spring boot出現(xiàn)總是跳轉(zhuǎn)到http

我的spring boot只提供http訪問,我在nginx配置的https,發(fā)現(xiàn)比如登錄自動(dòng)跳轉(zhuǎn)和redirect會(huì)自動(dòng)跳轉(zhuǎn)到http

我不想再spring boot配置ssl

怎么解決,網(wǎng)上都是spring boot配置ssl 其它方式也不行,不知道是不是版本問題

回答
編輯回答
笑忘初

Nginx的SSL配置了嗎?配置了的話,寫一段代碼

if ($scheme != 'https'){
        rewrite ......
}

根據(jù)這個(gè)去Google吧

2018年6月5日 14:00
編輯回答
萌吟

配置 spring boot和nginx轉(zhuǎn)發(fā)頭即可

2018年6月15日 19:08