in my aspnetboilerplate based site,
how do I remove X-Frame-Options: SAMEORIGIN
header from asp.net core response.
what I have tried
1.
string MyAllowSpecificOrigins = "_myAllowSpecificOrigins";
services.AddCors(options =>
{
options.AddPolicy(MyAllowSpecificOrigins,
builder =>
{
builder.WithOrigins("http://www.example.org/",
"https://www.example.org/");
});
});
app.UseCors(MyAllowSpecificOrigins);
also tried adding this in startup
services.AddAntiforgery(x => x.SuppressXFrameOptionsHeader = true);
adding in web.config <remove name="X-Frame-Options"/>
Initialize abp framework as follows:
app.UseAbp(options =>
{
options.UseSecurityHeaders = false;
}); // Initializes ABP framework.