Skip to content

Commit 5fba80e

Browse files
committed
SuppressXFrameOptionsHeader
1 parent 40a49de commit 5fba80e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

MyApp/Program.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
services.AddScoped<IdentityRedirectManager>();
2828
services.AddScoped<AuthenticationStateProvider, PersistingRevalidatingAuthenticationStateProvider>();
2929

30+
services.AddAntiforgery(options => {
31+
options.SuppressXFrameOptionsHeader = true;
32+
});
33+
3034
services.AddAuthentication(options =>
3135
{
3236
options.DefaultScheme = IdentityConstants.ApplicationScheme;
@@ -92,7 +96,7 @@
9296
app.UseHttpsRedirection();
9397

9498
app.UseStaticFiles();
95-
//app.UseAntiforgery(); remove X-Frame-Options header
99+
app.UseAntiforgery();
96100

97101
app.MapRazorComponents<App>()
98102
.AddInteractiveServerRenderMode()

0 commit comments

Comments
 (0)