UNPKG

@bedrock/resource-restriction

Version:
29 lines (23 loc) 904 B
/*! * Copyright (c) 2020-2022 Digital Bazaar, Inc. All rights reserved. */ import {config} from '@bedrock/core'; import {fileURLToPath} from 'node:url'; import path from 'node:path'; import '@bedrock/https-agent'; import '@bedrock/mongodb'; import '@bedrock/tokenizer'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); config.mocha.tests.push(path.join(__dirname, 'mocha')); // mongodb config config.mongodb.name = 'bedrock_resource_restriction_test'; config.mongodb.host = 'localhost'; config.mongodb.port = 27017; // drop all collections on initialization config.mongodb.dropCollections = {}; config.mongodb.dropCollections.onInit = true; config.mongodb.dropCollections.collections = []; // HTTPS Agent config['https-agent'].rejectUnauthorized = false; config.tokenizer.kms.baseUrl = `${config.server.baseUri}/kms`; config.tokenizer.kms.ipAllowList = ['127.0.0.1/32', '::1/128'];