fix: force HTTPS scheme di production untuk mengatasi Mixed Content error pada fetch jadwal events
This commit is contained in:
parent
aedf0bdb92
commit
e7a19a0181
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Support\Facades\View;
|
use Illuminate\Support\Facades\View;
|
||||||
|
use Illuminate\Support\Facades\URL;
|
||||||
use App\Models\Presensi;
|
use App\Models\Presensi;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
|
|
@ -16,6 +17,10 @@ public function register(): void
|
||||||
|
|
||||||
public function boot(): void
|
public function boot(): void
|
||||||
{
|
{
|
||||||
|
if (config('app.env') === 'production') {
|
||||||
|
URL::forceScheme('https');
|
||||||
|
}
|
||||||
|
|
||||||
\Illuminate\Pagination\Paginator::useTailwind();
|
\Illuminate\Pagination\Paginator::useTailwind();
|
||||||
|
|
||||||
View::composer('layouts.sidebar', function ($view) {
|
View::composer('layouts.sidebar', function ($view) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue