mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-12-13 10:28:25 +00:00
fix DI error in HttpRequestService.ts
This commit is contained in:
parent
25622b536c
commit
db15ac0fbb
2 changed files with 5 additions and 2 deletions
|
|
@ -148,12 +148,16 @@ export class HttpRequestService {
|
||||||
*/
|
*/
|
||||||
public readonly httpsAgent: https.Agent;
|
public readonly httpsAgent: https.Agent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get shared DNS resolver
|
||||||
|
*/
|
||||||
|
public readonly lookup: net.LookupFunction;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(DI.config)
|
@Inject(DI.config)
|
||||||
private config: Config,
|
private config: Config,
|
||||||
private readonly apUtilityService: ApUtilityService,
|
private readonly apUtilityService: ApUtilityService,
|
||||||
private readonly utilityService: UtilityService,
|
private readonly utilityService: UtilityService,
|
||||||
private readonly lookup: net.LookupFunction,
|
|
||||||
) {
|
) {
|
||||||
const cache = new CacheableLookup({
|
const cache = new CacheableLookup({
|
||||||
maxTtl: 3600, // 1hours
|
maxTtl: 3600, // 1hours
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import type { PrivateNetwork } from '@/config.js';
|
||||||
import type { Socket } from 'net';
|
import type { Socket } from 'net';
|
||||||
import { HttpRequestService, isAllowedPrivateIp, isPrivateUrl, resolveIp, validateSocketConnect } from '@/core/HttpRequestService.js';
|
import { HttpRequestService, isAllowedPrivateIp, isPrivateUrl, resolveIp, validateSocketConnect } from '@/core/HttpRequestService.js';
|
||||||
import { parsePrivateNetworks } from '@/config.js';
|
import { parsePrivateNetworks } from '@/config.js';
|
||||||
import { IPv4 } from 'ipaddr.js';
|
|
||||||
|
|
||||||
describe(HttpRequestService, () => {
|
describe(HttpRequestService, () => {
|
||||||
let allowedPrivateNetworks: PrivateNetwork[] | undefined;
|
let allowedPrivateNetworks: PrivateNetwork[] | undefined;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue