Skip to content

Commit

Permalink
OIDC issuer behind a proxy cannot be accessed
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanrobert committed Jan 6, 2025
1 parent 546feb5 commit 3025f07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/server/lib/OIDCConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ import { StringUnionError } from 'app/common/StringUnion';
import { EnabledProtection, EnabledProtectionString, ProtectionsManager } from './oidc/Protections';
import { SessionObj } from './BrowserSession';
import { getOriginUrl } from './requestUtils';
import { proxyAgent } from './ProxyAgent';

const CALLBACK_URL = '/oauth2/callback';

Expand Down Expand Up @@ -181,6 +182,7 @@ export class OIDCConfig {

this._redirectUrl = new URL(CALLBACK_URL, spHost).href;
custom.setHttpOptionsDefaults({
agent: issuerUrl !== undefined ? proxyAgent(new URL(issuerUrl)) : undefined,
...(httpTimeout !== undefined ? {timeout: httpTimeout} : {}),
});
await this._initClient({ issuerUrl, clientId, clientSecret, extraMetadata });
Expand Down

0 comments on commit 3025f07

Please sign in to comment.