fix(web): allow Google consent form redirects #108

Merged
eleith merged 1 commits from fix/google-consent-csp into main 2026-10-30 18:22:03 +00:00
3 changed files with 9 additions and 1 deletions

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
'@when/web': patch
---
Allow Google's consent origin in the form security policy so the admin calendar connection can redirect in Chromium.
+3
View File
@@ -18,6 +18,9 @@ test('the booking page sends the security headers', async ({ request }) => {
expect(headers['referrer-policy']).toBe('strict-origin-when-cross-origin');
expect(headers['x-content-type-options']).toBe('nosniff');
expect(headers['content-security-policy']).toContain("frame-ancestors 'none'");
expect(
headers['content-security-policy'].split(';').map((directive) => directive.trim())
).toContain("form-action 'self' https://accounts.google.com");
});
test('booking forms check browser Origin against the same trusted scheme and Host', async ({
+1 -1
View File
@@ -36,7 +36,7 @@ export default defineConfig(({ command }) => {
'connect-src': ['self'],
'object-src': ['none'],
'base-uri': ['self'],
'form-action': ['self'],
'form-action': ['self', 'https://accounts.google.com'],
'frame-ancestors': ['none']
}
}