Skip to content

Instantly share code, notes, and snippets.

View ADefWebserver's full-sized avatar

Michael Washington ADefWebserver

View GitHub Profile
@ADefWebserver
ADefWebserver / Program.cs
Created April 1, 2025 12:56
Allow a Blazor App app to be iframed in another app
// Configure the HTTP request pipeline
// To allow this Blazor App app to be iframed in another app
app.Use(async (context, next) =>
{
// How to display the app in an iframe
context.Response.OnStarting(() =>
{
// Remove X-Frame-Options header
context.Response.Headers.Remove("X-Frame-Options");