fix: allow native service proxy long requests
This commit is contained in:
@@ -48,6 +48,7 @@ COPY src/components/microservices/code-queue/package.json ./package.json
|
|||||||
RUN test -d node_modules/typescript || bun install
|
RUN test -d node_modules/typescript || bun install
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json /app/package.json
|
COPY package.json /app/package.json
|
||||||
|
COPY bun.lock /app/bun.lock
|
||||||
RUN bun install
|
RUN bun install
|
||||||
COPY src/components/shared /app/src/components/shared
|
COPY src/components/shared /app/src/components/shared
|
||||||
WORKDIR /app/src/components/microservices/code-queue
|
WORKDIR /app/src/components/microservices/code-queue
|
||||||
|
|||||||
@@ -515,8 +515,7 @@ async function nativeServiceProxyResponse(
|
|||||||
const headers = forwardHeaders(req);
|
const headers = forwardHeaders(req);
|
||||||
const bodyText = req.method === "GET" || req.method === "HEAD" ? "" : await req.text();
|
const bodyText = req.method === "GET" || req.method === "HEAD" ? "" : await req.text();
|
||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
const nativeTimeoutMs = Math.min(timeoutMs, config.nativeServiceProbeTimeoutMs);
|
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
||||||
const timer = setTimeout(() => controller.abort(), nativeTimeoutMs);
|
|
||||||
const startedAt = Date.now();
|
const startedAt = Date.now();
|
||||||
try {
|
try {
|
||||||
const upstream = await fetch(upstreamUrl, {
|
const upstream = await fetch(upstreamUrl, {
|
||||||
|
|||||||
Reference in New Issue
Block a user