Last active
November 21, 2023 09:34
SF_15.0 - https://www.progress.com/documentation/sitefinity-cms/configure-content-security-policy-header/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Hosting; | |
using Progress.Sitefinity.AspNetCore; | |
using Progress.Sitefinity.AspNetCore.FormWidgets; | |
var builder = WebApplication.CreateBuilder(args); | |
// Add services to the container. | |
//Add external source as trusted | |
builder.Services.AddSitefinity(x => x.CspOptions.CspDelegate = (cspDirectives, httpContext) => | |
{ | |
cspDirectives.DefaultSrc += "*.example.com"; | |
}); | |
// Rest of the Program.cs file remains unchanged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment