Add Custom IP-Ranges URL
This commit is contained in:
parent
fd30cfe98b
commit
aa08c440b9
1 changed files with 3 additions and 3 deletions
|
@ -5,9 +5,9 @@ const error = require('../lib/error');
|
|||
const internalNginx = require('./nginx');
|
||||
const { Liquid } = require('liquidjs');
|
||||
|
||||
const CLOUDFRONT_URL = 'https://ip-ranges.amazonaws.com/ip-ranges.json';
|
||||
const CLOUDFARE_V4_URL = 'https://www.cloudflare.com/ips-v4';
|
||||
const CLOUDFARE_V6_URL = 'https://www.cloudflare.com/ips-v6';
|
||||
const CLOUDFRONT_URL = process.env.CLOUDFRONT_URL !== '' ? process.env.CLOUDFRONT_URL : 'https://ip-ranges.amazonaws.com/ip-ranges.json';
|
||||
const CLOUDFARE_V4_URL = process.env.CLOUDFARE_V4_URL !== '' ? process.env.CLOUDFARE_V4_URL : 'https://www.cloudflare.com/ips-v4';
|
||||
const CLOUDFARE_V6_URL = process.env.CLOUDFARE_V6_URL !== '' ? process.env.CLOUDFARE_V6_URL : 'https://www.cloudflare.com/ips-v6';
|
||||
|
||||
const regIpV4 = /^(\d+\.?){4}\/\d+/;
|
||||
const regIpV6 = /^(([\da-fA-F]+)?:)+\/\d+/;
|
||||
|
|
Loading…
Reference in a new issue