fix:force https on staging or production
This commit is contained in:
parent
5966d6cb28
commit
defbdf678f
@ -5,6 +5,7 @@
|
||||
use Illuminate\Cache\RateLimiting\Limit;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\RateLimiter;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
@ -25,6 +26,9 @@ public function boot(): void
|
||||
// if (env('APP_ENV') !== 'local') {
|
||||
// URL::forceScheme('https');
|
||||
// }
|
||||
if (config('app.env') === 'production' || config('app.env') === 'staging') {
|
||||
URL::forceScheme('https');
|
||||
}
|
||||
|
||||
RateLimiter::for('login', function (Request $request) {
|
||||
return Limit::perMinute(3)->by($request->ip())->response(function (Request $request) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user