Skip to content

Commit

Permalink
Force https
Browse files Browse the repository at this point in the history
  • Loading branch information
henrist committed Jul 10, 2024
1 parent d278a2f commit f7db5a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Providers;

use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
Expand All @@ -19,6 +20,8 @@ public function register(): void
*/
public function boot(): void
{
//
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
URL::forceScheme('https');
}
}
}

0 comments on commit f7db5a6

Please sign in to comment.