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

[DEV-2046] Fix img_src CSP directive to see also in Dev the images inserted using production's CMS #1256

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/six-yaks-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"infrastructure": patch
---

Fix img_src CSP directive to see also in Dev the images inserted using production's CMS
4 changes: 2 additions & 2 deletions apps/infrastructure/src/modules/website/cloudfront.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ locals {
form_action = "'self'"
font_src = "data: 'self' https://privacyportalde-cdn.onetrust.com/privacy-notice-scripts/icons/"
connect_src = "'self' https://cognito-identity.eu-south-1.amazonaws.com/ https://dynamodb.eu-south-1.amazonaws.com/ https://cognito-idp.eu-south-1.amazonaws.com/ https://raw.githubusercontent.com/pagopa/ https://raw.githubusercontent.com/teamdigitale/ https://*.cookielaw.org https://*.onetrust.com https://www.google-analytics.com https://api.io.italia.it *.google-analytics.com https://pagopa.matomo.cloud/ https://*.${var.dns_domain_name}"
img_src = "data: 'self' https://i.vimeocdn.com/ https://io.italia.it/assets/ https://raw.githubusercontent.com/pagopa/ https://www.pagopa.gov.it/assets/ https://*.cookielaw.org/logos/ recaptcha.net https://*.googleusercontent.com https://*.${var.dns_domain_name}"
img_src = "data: 'self' https://i.vimeocdn.com/ https://io.italia.it/assets/ https://raw.githubusercontent.com/pagopa/ https://www.pagopa.gov.it/assets/ https://*.cookielaw.org/logos/ recaptcha.net https://*.googleusercontent.com https://*.dev.developer.pagopa.it https://*.developer.pagopa.it"
frame_src = "https://player.vimeo.com/ https://vimeo.com/ https://demo.arcade.software/ https://www.google.com https://recaptcha.net https://www.youtube.com https://pagopa.applytojob.com https://www.figma.com/ https://codepen.io/"
}

Expand Down Expand Up @@ -110,4 +110,4 @@ resource "aws_cloudfront_distribution" "website" {
acm_certificate_arn = var.use_custom_certificate ? aws_acm_certificate.website.arn : null
ssl_support_method = var.use_custom_certificate ? "sni-only" : null
}
}
}