mipotech/yii2-devlogin
最新稳定版本:1.2
Composer 安装命令:
composer require --dev mipotech/yii2-devlogin
包简介
A package to password-protect an entire site, typically when in dev or test mode
关键字:
README 文档
README
This package provides a simple way to password-protect an entire site, typically when in dev or test mode.
Installation
The preferred way to install this extension is through composer. Either run
php composer.phar require --prefer-dist mipotech/yii2-devlogin "*"
or add:
"mipotech/yii2-devlogin": "*",
to the require section of your composer.json file and perform a composer update.
Configuration
Add devlogin as an application component in @app/config/web.php:
'components' => [
...
'devlogin' => [
/* Required settings */
'class' => 'mipotech\devlogin\Bootstrap',
'username' => 'XXXXX',
'password' => 'YYYYY',
/* Optional settings */
'environments' => ['dev'], // defaults to ['dev', 'test']
'excludeIPs' => ['192.168.10.1'], // IP addresses to exclude from this rule. defaults to []
'excludePaths' => ['/dashboard','/gii'], // defaults to []
'logoPath' => '/images/logo.png',
],
...
]
and then add the devlogin component in the bootstrap section of the config file:
'bootstrap' => [
'log',
'devlogin',
...
]
That's it. The package is set up and ready to go.
统计信息
- 总下载量: 881
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-05-09