AwsServerlessFunctionUrlCorsArgs
interface AwsServerlessFunctionUrlCorsArgs {
allowCredentials?: Input<boolean>;
allowHeaders?: Input<Input<string>[]>;
allowMethods?: Input<Input<string>[]>;
allowOrigins?: Input<Input<string>[]>;
exposeHeaders?: Input<Input<string>[]>;
maxAge?: Input<number>;
}Lambda Function URL CORS settings.
Example
CODE
const cors: AwsServerlessFunctionUrlCorsArgs = {
allowOrigins: ['https://example.com'],
allowMethods: ['GET', 'POST'],
};Properties
allowCredentials: Input<boolean>
Whether the browser should expose credentials for cross-origin requests.
allowHeaders: Input<Input<string>[]>
Allowed request headers.
allowMethods: Input<Input<string>[]>
Allowed HTTP methods.
allowOrigins: Input<Input<string>[]>
Allowed origins.
exposeHeaders: Input<Input<string>[]>
Response headers exposed to browsers.
maxAge: Input<number>
How long the CORS preflight response may be cached, in seconds.