我在Blede模板上使用了Vite指令,如下所示:
@vite(['resources/css/app.css', 'resources/vue/app.js'])但是,这个指令总是输出为像这样的http (即使网站是https):
<link rel="stylesheet" href="http://localhost:8080/build/assets/app.efce9f3d.css" /><link rel="stylesheet" href="http://localhost:8080/build/assets/app.b9d5292c.css" /><script type="module" src="http://localhost:8080/build/assets/app.2887bec2.js"></script> </head>我怎么去https?
发布于 2022-10-07 08:16:22
使用HTTPS设置APP_URL
然后在AppServiceProvider中,您可以强制HTTPS
use Illuminate\Support\Facades\URL;
public function boot()
{
if ($this->app->environment('production')) {
URL::forceScheme('https');
}
}https://stackoverflow.com/questions/73983476
复制相似问题