@authhero/proxy 0.10.13 → 0.10.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/proxy.cjs +1 -1
- package/dist/proxy.d.ts +2 -0
- package/dist/proxy.mjs +726 -662
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/data-plane/cache-adapter-cache.d.ts +1 -0
- package/dist/types/data-plane/cache.d.ts +1 -0
- package/dist/types/data-plane/handlers/http.d.ts +7 -2
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ export interface CacheAdapterHostCacheOptions {
|
|
|
11
11
|
waitUntil?: (promise: Promise<unknown>) => void;
|
|
12
12
|
cacheReadTimeoutMs?: number;
|
|
13
13
|
cacheWriteTimeoutMs?: number;
|
|
14
|
+
upstreamTimeoutMs?: number;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Wraps an upstream `HostResolverCache` with a generic `CacheAdapter` layer.
|
|
@@ -9,6 +9,7 @@ export interface HostCacheOptions {
|
|
|
9
9
|
negativeTtlMs?: number;
|
|
10
10
|
maxEntries?: number;
|
|
11
11
|
waitUntil?: (promise: Promise<unknown>) => void;
|
|
12
|
+
upstreamTimeoutMs?: number;
|
|
12
13
|
}
|
|
13
14
|
export declare function createInMemoryHostCache(data: ProxyDataAdapter, ttlMs: number, maxEntries?: number): HostResolverCache;
|
|
14
15
|
export declare function createInMemoryHostCache(data: ProxyDataAdapter, options: HostCacheOptions): HostResolverCache;
|
|
@@ -5,10 +5,15 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
5
5
|
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
6
6
|
}, z.core.$strip>;
|
|
7
7
|
type Options = z.infer<typeof optionsSchema>;
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The response for a request whose body could not be read up front: 408 when
|
|
10
|
+
* the client was too slow, 400 when the stream failed.
|
|
11
|
+
*/
|
|
12
|
+
export declare function bodyReadFailure(err: unknown): Response;
|
|
13
|
+
export declare function buildUpstreamRequest(options: Options, req: Request, bodyTimeoutMs: number): Promise<{
|
|
9
14
|
target: URL;
|
|
10
15
|
init: RequestInit;
|
|
11
|
-
}
|
|
16
|
+
}>;
|
|
12
17
|
export declare const httpHandler: import("../registry").HandlerDefinition<{
|
|
13
18
|
upstream_url: string;
|
|
14
19
|
preserve_host: boolean;
|