CloudFront Lambda function created when insertHttpSecurityHeaders is false
I have a website being served with the CloudFrontToS3 construct, and I noticed that even if I set the insertHttpSecurityHeaders to false, the SetHttpSecurityHeaders lambda is still created. I would like if the lambda was not created if I'm not using it.
This is :bug: Bug Report
Thanks, we'll take a look
Can you share a code sample and version information where you are seeing this behavior. When we run he code below there is no Lambda function created using v2.51.0 of the construct.
import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { CloudFrontToS3, CloudFrontToS3Props} from '@aws-solutions-constructs/aws-cloudfront-s3';
export class Issue1061Stack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
const issueProps: CloudFrontToS3Props = {
insertHttpSecurityHeaders: false
}
new CloudFrontToS3(this, 'issue1061test', issueProps);
}
}
@biffgaut I recognize I owe you some code. I plan on deploying something this week and upload some screenshots.