import type { Response } from 'express'; import type { CspDirectives } from '../types/CspDirectives'; export interface UpdateCspOptions { /** Content-Security-Policy directives to merge into response’s header */ directives?: CspDirectives; /** Base URL of MFE components service for fallback Content-Security-Policy directives */ feComponentsUrl: string; /** The express response whose Content-Security-Policy header should be updated */ res: Response; } /** * Update Content-Security-Policy header in response to allow use of MFE components on another domain/origin * with given directives, falling back to predefined directives known to be required */ export default function updateCsp(options: UpdateCspOptions): void; /** * Update Content-Security-Policy header in response to allow use of MFE components on another domain/origin * using predefined directives known to be required * @deprecated provide options to `updateCsp` as a single object */ export default function updateCsp(feComponentsUrl: string, res: Response): void;