我碰到的問題大概是這樣,容器環境跑Laravel,
容器內沒有HTTPS造成Laravel用沒有https的方式傳送表單。
在AppServiceProvider的boot補上如下語法
\URL::forceScheme('https');
大概像這樣
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
\URL::forceScheme('https');
}
}
No Comment
Post your comment