Skip to content

Commit bf54c8c

Browse files
committed
Increase config fetch timeout, lower configUrl logging level
Signed-off-by: Michael Edgar <medgar@redhat.com>
1 parent a9c8c01 commit bf54c8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/middleware.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ export default async function middleware(req: NextRequest) {
4848
* call to the /config endpoint within the same application :(
4949
*/
5050
const configUrl = `http://127.0.0.1:${process.env.PORT || '3000'}/config`;
51-
log.info({ configUrl }, "Fetching OIDC configuration");
51+
log.debug({ configUrl }, "Fetching OIDC configuration");
5252

5353
let oidcEnabled = await fetch(configUrl, {
5454
cache: "force-cache",
55-
signal: AbortSignal.timeout(1000), // 1 second timeout to prevent hanging
55+
signal: AbortSignal.timeout(10000), // 10 second timeout to prevent hanging
5656
})
5757
.then((cfg) => cfg.json())
5858
.then((cfg) => cfg["oidc"])

0 commit comments

Comments
 (0)