mirror of
https://github.com/cytopia/devilbox.git
synced 2025-01-29 15:44:04 +00:00
Refs #476 Enable autologin for phpPgAdmin
This commit is contained in:
parent
5c492f3089
commit
f20e8205d8
@ -20,6 +20,19 @@
|
||||
// Database port on server (5432 is the PostgreSQL default)
|
||||
$conf['servers'][0]['port'] = 5432;
|
||||
|
||||
// ---- Auto-login
|
||||
if (getenv('DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN') == 1) {
|
||||
$_REQUEST['server']= 'pgsql:5432:allow';
|
||||
if(session_id() == ''){
|
||||
//session has not started
|
||||
session_name('PPA_ID');
|
||||
session_start();
|
||||
}
|
||||
$_SESSION['sharedUsername'] = getenv('PGSQL_ROOT_USER');
|
||||
$_SESSION['sharedPassword'] = getenv('PGSQL_ROOT_PASSWORD');
|
||||
}
|
||||
// ---- end of Auto-login
|
||||
|
||||
// Database SSL mode
|
||||
// Possible options: disable, allow, prefer, require
|
||||
// To require SSL on older servers use option: legacy
|
||||
|
@ -55,8 +55,10 @@
|
||||
|
||||
// Start session (if not auto-started)
|
||||
if (!ini_get('session.auto_start')) {
|
||||
session_name('PPA_ID');
|
||||
session_start();
|
||||
if (session_id() == '') {
|
||||
session_name('PPA_ID');
|
||||
session_start();
|
||||
}
|
||||
}
|
||||
|
||||
// Do basic PHP configuration checks
|
||||
|
@ -7,8 +7,10 @@
|
||||
*/
|
||||
|
||||
if (!ini_get('session.auto_start')) {
|
||||
session_name('PPA_ID');
|
||||
session_start();
|
||||
if (session_id() == '') {
|
||||
session_name('PPA_ID');
|
||||
session_start();
|
||||
}
|
||||
}
|
||||
unset($_SESSION);
|
||||
session_destroy();
|
||||
|
26
env-example
26
env-example
@ -6,10 +6,22 @@
|
||||
### All the following settings are applied during
|
||||
### $ docker-compose up
|
||||
###
|
||||
### No need to rebuild any dockers!
|
||||
### No need to rebuild any docker images!
|
||||
###
|
||||
### For custom variables, scroll to the bottom
|
||||
### IMPORTANT:
|
||||
### ----------
|
||||
### When changing any values ensure to stop, rm and restart:
|
||||
### $ docker-compose stop
|
||||
### $ docker-compose rm -f
|
||||
### $ docker-compose up
|
||||
###
|
||||
### NOTE:
|
||||
### -----
|
||||
### For you own custom variables, scroll to the bottom
|
||||
###
|
||||
|
||||
# The following line will disable any shellcheck warnings throughout this file
|
||||
# shellcheck disable=SC2034,SC2125
|
||||
|
||||
|
||||
###
|
||||
@ -212,6 +224,16 @@ DEVILBOX_UI_ENABLE=1
|
||||
DEVILBOX_VENDOR_PHPMYADMIN_AUTOLOGIN=1
|
||||
|
||||
|
||||
###
|
||||
### Automatically be logged in into phpPgAdmin
|
||||
###
|
||||
### Example:
|
||||
### DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN=1
|
||||
### DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN=0
|
||||
###
|
||||
DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN=1
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
###
|
||||
|
Loading…
x
Reference in New Issue
Block a user