File tree Expand file tree Collapse file tree
content/StsServerIdentity Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,13 +13,6 @@ public override void OnResultExecuting(ResultExecutingContext context)
1313 var result = context . Result ;
1414 if ( result is ViewResult )
1515 {
16- var featurePolicy = "accelerometer 'none'; camera 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; payment 'none'; usb 'none'" ;
17-
18- if ( ! context . HttpContext . Response . Headers . ContainsKey ( "feature-policy" ) )
19- {
20- context . HttpContext . Response . Headers . Add ( "feature-policy" , featurePolicy ) ;
21- }
22-
2316 if ( ! context . HttpContext . Response . Headers . ContainsKey ( "X-Content-Type-Options" ) )
2417 {
2518 context . HttpContext . Response . Headers . Add ( "X-Content-Type-Options" , "nosniff" ) ;
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public static HeaderPolicyCollection GetHeaderPolicyCollection(bool isDev)
3333 builder . AddFontSrc ( ) . Self ( ) ;
3434 builder . AddStyleSrc ( ) . Self ( ) . UnsafeInline ( ) ;
3535 builder . AddBaseUri ( ) . Self ( ) ;
36- builder . AddScriptSrc ( ) . UnsafeInline ( ) ; //.WithNonce();
36+ builder . AddScriptSrc ( ) . Self ( ) . UnsafeInline ( ) ; //.WithNonce();
3737 builder . AddFrameAncestors ( ) . Self ( ) ;
3838 // builder.AddCustomDirective("require-trusted-types-for", "'script'");
3939 } )
You can’t perform that action at this time.
0 commit comments