Use S3 and CloudFront for static files

This commit is contained in:
video-prize-ranch
2022-01-28 18:44:36 -05:00
parent be24ab2342
commit e3488c3527
7 changed files with 17 additions and 17 deletions

View File

@@ -8,7 +8,7 @@ import (
func FrontpageHandler(c *fiber.Ctx) error {
utils.SetHeaders(c)
c.Set("Cache-Control", "public,max-age=31557600")
c.Set("Content-Security-Policy", "default-src 'none'; style-src 'self'; img-src 'self'; font-src 'self'; block-all-mixed-content")
c.Set("Content-Security-Policy", "default-src 'none'; style-src 'self' *.cloudfront.net; img-src 'self' *.cloudfront.net; font-src 'self'; block-all-mixed-content")
return c.Render("frontpage", fiber.Map{})
}