Fetch ip ranges for CDN servers, Cloudfront and Cloudfare

This commit is contained in:
Jamie Curnow
2019-01-03 17:04:53 +10:00
parent 9fcd32c2ca
commit 3836f7c40a
6 changed files with 355 additions and 8 deletions

View File

@ -11,6 +11,7 @@ function appStart () {
const app = require('./app');
const apiValidator = require('./lib/validator/api');
const internalCertificate = require('./internal/certificate');
const internalIpRanges = require('./internal/ip_ranges');
return migrate.latest()
.then(setup)
@ -18,9 +19,11 @@ function appStart () {
.then(() => {
return apiValidator.loadSchemas;
})
.then(internalIpRanges.fetch)
.then(() => {
internalCertificate.initTimer();
internalIpRanges.initTimer();
const server = app.listen(81, () => {
logger.info('PID ' + process.pid + ' listening on port 81 ...');