Commit bd606f1
fix(api-docs): allow Scalar CDN in CSP for /api-docs
Scalar's reference UI (served by Nitro at /api-docs) loads its bundle from cdn.jsdelivr.net, which was blocked by the global script-src CSP. Add a scoped CSP variant that allows jsdelivr + Google Fonts for the docs route only; the rest of the app keeps the strict policy.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f627ddc commit bd606f1
1 file changed
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
20 | 35 | | |
21 | 36 | | |
22 | 37 | | |
23 | 38 | | |
24 | 39 | | |
25 | 40 | | |
| 41 | + | |
| 42 | + | |
26 | 43 | | |
27 | 44 | | |
28 | 45 | | |
29 | 46 | | |
30 | 47 | | |
31 | 48 | | |
32 | 49 | | |
33 | | - | |
| 50 | + | |
34 | 51 | | |
35 | 52 | | |
36 | 53 | | |
0 commit comments