|
|
@@ -39,7 +39,8 @@ class AppServiceProvider extends ServiceProvider
|
|
|
*/
|
|
|
public function boot(): void
|
|
|
{
|
|
|
- if (config('app.env') === 'production') {
|
|
|
+ // 只有当 APP_URL 是 https 时才强制 https(容器内部通信用 http)
|
|
|
+ if (config('app.env') === 'production' && str_starts_with(config('app.url'), 'https://')) {
|
|
|
URL::forceScheme('https');
|
|
|
}
|
|
|
|