Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

harden web security #273

Merged
merged 40 commits into from
Jan 4, 2022
Merged

harden web security #273

merged 40 commits into from
Jan 4, 2022

Conversation

abhinavkgrd
Copy link
Member

Description

  • Moved headers from Next config to _headers because static exported files don't retain the headers [1]
  • added security headers suggested by observatory with some caveats
  • style-src unsafe-inline allowed [2][3]
  • script-src unsafe-eval allowed [4][5]
  • use ente domain URLs for workers
  • added connect-src https://ente-prod-eu.s3.eu-central-003.backblazeb2.com

[1] https://nextjs.org/docs/advanced-features/static-html-export#unsupported-features
[2] vercel/next.js#18557
[3] styled-components/styled-components#2363
[4] WebAssembly/content-security-policy#7
[5] strukturag/libheif#173

Test Plan

Observatory shows that the intended directives have been activated:
https://observatory.mozilla.org/analyze/web-security.bada-frame.pages.dev

@abhinavkgrd abhinavkgrd changed the title Web security harden web security Jan 4, 2022
@vishnukvmd vishnukvmd self-requested a review January 4, 2022 07:30
@abhinavkgrd abhinavkgrd merged commit 1d0aa42 into master Jan 4, 2022
@abhinavkgrd abhinavkgrd deleted the web-security-clean branch January 16, 2022 11:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants