Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/OwenMelbz/https-enforcement
Laravel 5 Middleware to enforce HTTPS on your application.
https://github.com/OwenMelbz/https-enforcement
https laravel-5-package redirect
Last synced: 13 days ago
JSON representation
Laravel 5 Middleware to enforce HTTPS on your application.
- Host: GitHub
- URL: https://github.com/OwenMelbz/https-enforcement
- Owner: OwenMelbz
- Created: 2017-05-25T21:33:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-02T09:30:26.000Z (over 7 years ago)
- Last Synced: 2024-08-02T11:25:10.045Z (4 months ago)
- Topics: https, laravel-5-package, redirect
- Language: PHP
- Size: 8.79 KB
- Stars: 25
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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.