using Microsoft.AspNetCore.Builder; namespace DigitalData.Core.API { /// /// Provides extension methods for adding middleware to the application's request pipeline. /// public static class DIExtensions { /// /// Adds the to the application's request pipeline to include /// Content Security Policy (CSP) headers in the HTTP response. /// /// The application builder. /// /// The CSP policy string with placeholders. The first format parameter {0} will be replaced /// by the nonce value. /// /// The application builder with the CSP middleware added. public static IApplicationBuilder UseCSPMiddleware(this IApplicationBuilder app, string policy) => app.UseMiddleware(policy); } }