Commit 9e3503a
feat(api): baseline security headers; suppress the MSAL local-network prompt
@azure/msal-browser v4's silent-auth iframe sets `allow="local-network-access *"`
on itself so the embedded IdP page can probe a localhost SSO broker — which
makes Chrome prompt the user "this page wants to access your other devices"
on every fresh visit. Set `Permissions-Policy: local-network-access=(self)`
on all responses: that caps the cross-origin delegation to the
login.microsoftonline.com iframe, so the prompt never fires; the silent
flow is unaffected (it doesn't need the broker).
Also adds X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN
(not DENY — the MSAL silent iframe briefly lands back on this origin),
Referrer-Policy: strict-origin-when-cross-origin. A full CSP (DESIGN §D3)
is left for a follow-up — it needs a vite.config change to drop the inline
modulepreload polyfill first.1 parent 3bfd26f commit 9e3503a
1 file changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
42 | 65 | | |
43 | 66 | | |
44 | 67 | | |
| |||
0 commit comments