Skip to content

Commit 989949a

Browse files
authored
docs: add report uri directive to CSP example (#12788)
* add report uri directive to example * generate types * move line higher * the
1 parent 8aa95b4 commit 989949a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/kit/src/exports/public.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,10 @@ export interface KitConfig {
332332
* directives: {
333333
* 'script-src': ['self']
334334
* },
335+
* // must be specified with either the `report-uri` or `report-to` directives, or both
335336
* reportOnly: {
336-
* 'script-src': ['self']
337+
* 'script-src': ['self'],
338+
* 'report-uri': ['/']
337339
* }
338340
* }
339341
* }

packages/kit/types/index.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,10 @@ declare module '@sveltejs/kit' {
314314
* directives: {
315315
* 'script-src': ['self']
316316
* },
317+
* // must be specified with either the `report-uri` or `report-to` directives, or both
317318
* reportOnly: {
318-
* 'script-src': ['self']
319+
* 'script-src': ['self'],
320+
* 'report-uri': ['/']
319321
* }
320322
* }
321323
* }

0 commit comments

Comments
 (0)