voronoi / lock-dev-middleware
Laravel middleware to add HTTP Auth just to dev servers
Installs: 54
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/voronoi/lock-dev-middleware
Requires
- php: >=7.1
Requires (Dev)
- orchestra/testbench: ~3.8.0
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2025-10-11 17:10:55 UTC
README
This package is a dead simple way to lock access to a dev website behind basic HTTP authentication. This middleware will not authenticate for local, testing, or production environments.
Installation
-
composer require voronoi/lock-dev-middleware -
Set
DEV_USERNAMEandDEV_PASSWORDin your.envfile. -
Add
\Voronoi\LockDev\Middleware::classto yourapp/Http/Kernel.phpto lock everything down.
protected $middleware = [
\App\Http\Middleware\DevLogin::class,
...
];
- Enjoy!
Tests
Be sure to run the tests with --stderr. e.g. vendor/bin/phpunit --stderr.