Adds the typical htaccess auth dialog before each request. This module is made as angular does have problems with basic htaccess authentifications in the administration area.
Add the luyadev/luya-module-basicauth
package to your composer config:
composer require luyadev/luya-module-basicauth
Add the module to your configuration in the modules section.
'modules' => [
//...
'basicauth' => [
'class' => 'luya\basicauth\Module',
'password' => '<DEFINE_THE_PASSWORD_HERE>',
]
]
As the module checks the authentication status on before each request, you have to bootstrap the module inside the bootstrap section of your config:
'bootstrap' => [
'basicauth',
],
All frontend requests are now protected with your entered password from the config.