Package Data | |
---|---|
Maintainer Username: | ecrmnn |
Maintainer Contact: | danieleckermann@gmail.com (Daniel Eckermann) |
Package Create Date: | 2017-07-18 |
Package Last Update: | 2017-08-17 |
Home Page: | https://packagist.org/packages/ecrmnn/laravel-https |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-02-06 03:04:19 |
Package Statistics | |
---|---|
Total Downloads: | 130,915 |
Monthly Downloads: | 1,328 |
Daily Downloads: | 34 |
Total Stars: | 60 |
Total Watchers: | 4 |
Total Forks: | 8 |
Total Open Issues: | 0 |
Generate HTTPS-links and redirect all requests to HTTPS. Also works with load balancing, AWS, Heroku and other services
composer require ecrmnn/laravel-https
providers
in config/app.php
\Ecrmnn\LaravelHttps\Providers\ServiceProvider::class,
$middleware
in app/Http/Kernel.php
\Ecrmnn\LaravelHttps\Http\Middleware\ForceHttps::class,
HTTPS will only be forced when env('HTTPS')
is set to true
HTTPS=true
LaravelHTTPS
forces the URL scheme in Laravel to use the HTTPS prefix for all links generated using url()
and route()
. That mean that all your links can be converted to use HTTPS just by installing LaravelHTTPS
With the middleware included; ForceHttps
, you can simply specify that as a global middleware and all requests
will be redirected correctly when accessing a non-HTTPS URL.
MIT © Daniel Eckermann