OwenMelbz / https-enforcement by OwenMelbz

Laravel 5.x middleware to enforce https redirection for your app.
2,596
25
2
Package Data
Maintainer Username: OwenMelbz
Maintainer Contact: owenmelbz@gmail.com (Owen Melbourne)
Package Create Date: 2017-05-25
Package Last Update: 2017-06-02
Language: PHP
License: MIT
Last Refreshed: 2024-04-23 03:08:13
Package Statistics
Total Downloads: 2,596
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 25
Total Watchers: 2
Total Forks: 2
Total Open Issues: 0

Laravel 5 HTTPS Enforcement Agent

An automatic piece of middleware for Laravel 5.x, which will redirect users accessing non https urls, to the secure equivalent unless specified in the ignore list

Usage

1- Install via composer composer require owenmelbz/https-enforcement

2- Register the service provider - typically done inside the app.php providers array e.g OwenMelbz\HttpsEnforcement\HttpsEnforcementServiceProvider::class

3- Add ENFORCE_HTTPS=true to your application environment config e.g .env

4- Enjoy your stress free architecture agnostic redirects

Why?

Too often we've wasted time configuring SSL redirection, with proxy systems like CloudFlare, with apache development machines and nginx production, this removes all the headache and can simply be turned off and on at a whim.