鍍金池/ 問(wèn)答/PHP  網(wǎng)絡(luò)安全/ laravel5.5分頁(yè) 生成url非https問(wèn)題

laravel5.5分頁(yè) 生成url非https問(wèn)題

項(xiàng)目環(huán)境:laravel5.5
使用https協(xié)議,已經(jīng)在 AppServiceProvider boot 方法中設(shè)置了 URL::forceScheme('https');強(qiáng)制使用https協(xié)議,其他部分生成的url均正常,但使用paginate()分頁(yè)生成的url是http的,求解!

回答
編輯回答
局外人

laravel 5.5 分頁(yè)有個(gè) withPath()方法,你可以試試 withPath('/') 看看

https://laravel-china.org/doc...

另一種可能是不是中間使用了代理,代理是 http 的

2017年5月11日 07:27