Skip to content

Commit cf2e1b3

Browse files
alan-agius4AndrewKushnir
authored andcommitted
refactor(platform-server): add link that explains nonce application/json (angular#55505)
Add a link to the specs explaining why nonce is not needed for `application/json`. PR Close angular#55505
1 parent b28d0bf commit cf2e1b3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/platform-server/src/transfer_state.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ function serializeTransferStateFactory(doc: Document, appId: string, transferSto
5050
const script = createScript(
5151
doc,
5252
content,
53-
null /** nonce is not required for 'application/json' */,
53+
/**
54+
* `nonce` is not required for 'application/json'
55+
* See: https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type
56+
*/
57+
null,
5458
);
5559
script.id = appId + '-state';
5660
script.setAttribute('type', 'application/json');

0 commit comments

Comments
 (0)