app.use(
helmet({
contentSecurityPolicy: {
directives: {
...helmet.contentSecurityPolicy.getDefaultDirectives(),
'img-src': ["'self'", process.env.AWS_S3_IMAGE_URL],
// AWS_S3_IMGAGE_URL : 허용할 이미지 소스의 주소
},
},
})
);
https://stackoverflow.com/questions/65295213/allowing-s3-images-with-npm-helmet 참고