Fixed env variable METRICS_ACCEPTED_IP_ADDRESS to be same as at docs.

Thanks to salleman33 !

Fixes #5671
This commit is contained in:
Lauri Ojansivu 2025-01-29 13:38:40 +02:00
parent 151aafd114
commit 0b1e0bd395

View file

@ -2,7 +2,7 @@ import { Meteor } from 'meteor/meteor';
import Users from '../users';
function acceptedIpAddress(ipAddress) {
const trustedIpAddress = process.env.WEKAN_METRICS_ACCEPTED_IP_ADDRESS;
const trustedIpAddress = process.env.METRICS_ACCEPTED_IP_ADDRESS;
return (
trustedIpAddress !== undefined &&
trustedIpAddress.split(',').includes(ipAddress)
@ -48,7 +48,7 @@ Meteor.startup(() => {
// const ipAddress = req.socket.remoteAddress
// }
// List of trusted ip adress will be found in environment variable "WEKAN_METRICS_ACCEPTED_IP_ADDRESS" (separeted with commas)
// List of trusted ip adress will be found in environment variable "METRICS_ACCEPTED_IP_ADDRESS" (separeted with commas)
if (acceptedIpAddress(ipAddress)) {
let metricsRes = '';
let resCount = 0;