Umožnit zadání trusted IPs s bílými znaky
This commit is contained in:
parent
515d4bb47e
commit
4991b813bf
@ -38,7 +38,7 @@ if (HTTP_REMOTE_USER_ENABLED) {
|
||||
if (!process.env.HTTP_REMOTE_TRUSTED_IPS) {
|
||||
throw new Error('Je zapnutý login z hlaviček, ale není nastaven rozsah adres ze kterých hlavička může přijít.');
|
||||
}
|
||||
const HTTP_REMOTE_TRUSTED_IPS = process.env.HTTP_REMOTE_TRUSTED_IPS.split(',');
|
||||
const HTTP_REMOTE_TRUSTED_IPS = process.env.HTTP_REMOTE_TRUSTED_IPS.split(',').map(ip => ip.trim());
|
||||
//TODO: nevim jak udelat console.log pouze pro "debug"
|
||||
//console.log("Budu věřit hlavičkám z: " + HTTP_REMOTE_TRUSTED_IPS);
|
||||
app.set('trust proxy', HTTP_REMOTE_TRUSTED_IPS);
|
||||
|
Loading…
x
Reference in New Issue
Block a user