mirror of
https://github.com/directus/directus.git
synced 2026-02-18 03:31:22 -05:00
TS Config Modernization Program Part 3 of many (#17904)
* noImplicitOverride: true * noImplicitReturns: true * noPropertyAccessFromIndexSignature: true
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user