TS Config Modernization Program Part 3 of many (#17904)

* noImplicitOverride: true

* noImplicitReturns: true

* noPropertyAccessFromIndexSignature: true
This commit is contained in:
Rijk van Zanten
2023-03-23 16:47:55 -04:00
committed by GitHub
parent 8b0c5f1250
commit 80f4807a09
129 changed files with 1097 additions and 1017 deletions

View File

@@ -4,11 +4,11 @@ import { getEnv } from '../env';
export const validateIP = async (ip: string, url: string) => {
const env = getEnv();
if (env.IMPORT_IP_DENY_LIST.includes(ip)) {
if (env['IMPORT_IP_DENY_LIST'].includes(ip)) {
throw new Error(`Requested URL "${url}" resolves to a denied IP address`);
}
if (env.IMPORT_IP_DENY_LIST.includes('0.0.0.0')) {
if (env['IMPORT_IP_DENY_LIST'].includes('0.0.0.0')) {
const networkInterfaces = os.networkInterfaces();
for (const networkInfo of Object.values(networkInterfaces)) {