Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CNAME and SSL removed on Update #185

Closed
Lunteer opened this issue Feb 11, 2020 · 4 comments
Closed

CNAME and SSL removed on Update #185

Lunteer opened this issue Feb 11, 2020 · 4 comments

Comments

@Lunteer
Copy link

Lunteer commented Feb 11, 2020

We updated to the latest version for the Cache-Control fix (Thanks), #107. Our issue is on CloudFront it removed the CNAME and SSL certificate. We fixed the issue by re-adding it (so no major deal) but wanted to know if there is a way to preventing this in the future?

Thanks again for this amazing template!!

@beomseoklee
Copy link
Member

Thanks for reaching out to us @Lunteer
Did you use your own CNAME and SSL certificate on CloudFront distribution? I just want to make sure I'm with you. Previously, which version did you use?

@Lunteer
Copy link
Author

Lunteer commented Feb 11, 2020 via email

@beomseoklee
Copy link
Member

Thanks for your detail, @Lunteer
Due to support WebP automatically, we've added "Accept" header at ForwardedValues of Amazon CloudFront distribution, and it causes the update of the distribution.

I have successfully reproduced your issue. Like you said, you can add more configurations before updating so that you don't lose your CNAME and SSL setting on your distribution.

        "ImageHandlerDistribution": {
            "Type": "AWS::CloudFront::Distribution",
            "Properties": {
                "DistributionConfig": {
                    "Aliases": [
                        "YOUR_CNAME_ALIAS"
                    ],
                    "ViewerCertificate": {
                        "AcmCertificateArn": "YOUR_CERTIFICATE_ARN",
                        "MinimumProtocolVersion": "TLSv1.2_2018",
                        "SslSupportMethod": "sni-only"
                    },

As we don't originally support the alternative domain names (CNAMEs) on the Amazon CloudFront distribution for this solution, it could happen for the next update as well, so please keep in your mind that you might need to add more settings on the AWS CloudFormation template.

I hope this would be helpful for you.

@Lunteer
Copy link
Author

Lunteer commented Feb 12, 2020

Thanks so much for testing, confirmation, code solution and overall clarity of the issue. You are awesome!!

@Lunteer Lunteer closed this as completed Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants