Beispiel #1
0
 /// <summary>
 /// Adds the X-Download-Options header with 'noopen' value to all file downloads.
 /// </summary>
 /// <param name="app"></param>
 /// <param name="options"></param>
 public static void UseXDownloadOptions(this IApplicationBuilder app, XDownloadOptions options = XDownloadOptions.NoOpen)
 {
     app.UseMiddleware <XDownloadOptionsMiddleware>();
 }
Beispiel #2
0
 public static IServiceCollection AddXDownloadOptions(this IServiceCollection services, XDownloadOptions options = XDownloadOptions.NoOpen)
 {
     return(services.AddSingleton <XDownloadOptionsMiddleware>());
 }