【发布时间】:2019-09-06 02:47:47
【问题描述】:
我正在使用Laravel 5.8
目前我有这个网站:示例名称
https://www.myssldomain.com/ewallet
和
我有这个网站:样本名称
当用户触发/搜索此链接时,使用我的myssldomain.com 中包含的Proxy Pass:https://www.myssldomain.com/ewallet/login
浏览器会加载本站内容http://my-aws-public-ip/login
proxy pass 工作正常,但问题是 styles 和 javascript 未加载,浏览器显示 Mixed Content 因为 my-aws-public-ip 站点加载为 HTTP 而不是 HTTPS
目前
我把config/app.php改成了
'url' => env('APP_URL', 'https://www.myssldomain.com/ewallet/'),
和
我的
.env 文件我将APP_URL 更改为https://www.myssldomain.com/ewallet/
我尝试了什么
还有
我遵循了这些步骤,但似乎也不起作用。
https://coderwall.com/p/g9qkea/mixed-content-issue-content-must-be-served-as-https-in-laravel
我也尝试更改以下内容以解决问题
APP_ENV=production
APP_DEBUG=false
APP_URL=https://www.myssldomain.com/ewallet/
并在web.php开头添加这段代码
if (App::environment('production')) {
URL::forceScheme('https');
}
但仍然无法在我身边工作。 我需要设置什么来确保这能正常工作吗?
预期
使用来自 myssldomain.com 的代理传递
【问题讨论】: