Skip to content

Commit c51bb6a

Browse files
committed
Try throwing an error if SSR and auto-CSP are both set at the same time!
1 parent 82f1882 commit c51bb6a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/angular/build/src/utils/index-file/index-html-generator.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ export class IndexHtmlGenerator {
9595

9696
// Auto-CSP (as the last step)
9797
if (options.autoCsp) {
98+
if (options.generateDedicatedSSRContent) {
99+
throw new Error('Cannot set both SSR and auto-CSP at the same time.');
100+
}
98101
this.csrPlugins.push(autoCspPlugin(options.autoCsp.unsafeEval));
99102
}
100103
}

0 commit comments

Comments
 (0)