fix: Trust X-Forwarded headers in the IDP

This commit is contained in:
Joachim Van Herwegen
2021-07-26 13:59:09 +02:00
parent 41694a171d
commit 2df3f1f28c
2 changed files with 7 additions and 2 deletions

View File

@@ -79,7 +79,9 @@ describe('An IdentityProviderFactory', (): void => {
it('creates a correct configuration.', async(): Promise<void> => {
// This is the output of our mock function
const { issuer, config } = await factory.getProvider() as unknown as { issuer: string; config: Configuration };
const provider = await factory.getProvider() as any;
expect(provider.proxy).toBe(true);
const { issuer, config } = provider as { issuer: string; config: Configuration };
expect(issuer).toBe(baseUrl);
// Copies the base config