【发布时间】:2018-07-13 09:35:35
【问题描述】:
我已更改我的 APP_URL=https://example.com,我已将其添加到我的 AppServiceProvider 的启动方法中:
/** Enable HTTPS */
if(env('REDIRECT_HTTPS')) {
$url->forceSchema('https');
}
我已经运行了php artisan cache:clear、php artisan view:clear 和php artisan config:clear。我仍然无法获得使用 https 的资产和动态路由。刚刚收到错误:
混合内容:“https://example.com/”处的页面通过 HTTPS 加载,但请求了不安全的样式表“http://example.com/css/app.css”。此请求已被阻止;内容必须通过 HTTPS 提供。
我知道我可以使用secure_asset 而不是asset,这应该可以,但我需要它是动态的,因为我现在仍然需要在另一个域上提供该网站的 http 版本。
【问题讨论】: