cloudflare: when proxying is enabled, use a valid IP

This commit is contained in:
Girish Ramakrishnan
2025-10-08 14:50:00 +02:00
parent 01d7d41c17
commit e9318d7f11

View File

@@ -248,7 +248,7 @@ async function verifyDomainConfig(domainObject) {
if (typeof domainConfig.defaultProxyStatus !== 'boolean') throw new BoxError(BoxError.BAD_FIELD, 'defaultProxyStatus must be a boolean');
const ip = '127.0.0.1';
const ip = !domainConfig.defaultProxyStatus ? '127.0.0.1' : '103.31.4.0'; // when proxying 127.0.0.1 is not valid. use an address owned by cloudflare itself
const sanitizedConfig = {
token: domainConfig.token,