Vivet.AspNetCore.RequestVirusScan 9.0.0

dotnet add package Vivet.AspNetCore.RequestVirusScan --version 9.0.0                
NuGet\Install-Package Vivet.AspNetCore.RequestVirusScan -Version 9.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Vivet.AspNetCore.RequestVirusScan" Version="9.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Vivet.AspNetCore.RequestVirusScan --version 9.0.0                
#r "nuget: Vivet.AspNetCore.RequestVirusScan, 9.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Vivet.AspNetCore.RequestVirusScan as a Cake Addin
#addin nuget:?package=Vivet.AspNetCore.RequestVirusScan&version=9.0.0

// Install Vivet.AspNetCore.RequestVirusScan as a Cake Tool
#tool nuget:?package=Vivet.AspNetCore.RequestVirusScan&version=9.0.0                

Vivet.AspNetCore.RequestVirusScan

Build status NuGet NuGet

Middleware to configure requset virus scan of uploaded files.

This library uses ClamAV for scanning and detecting virusses and malware in files. A server or container running ClamAV is required to use this middleware.


Registration

To configure the Request Virus Scan Middleware, first add the required services to the IServiceCollection, as shown below.

services
    .AddRequestVirusScan(x => 
    {
        // Configuration.
    });

or, read the configuration from the clamav section in app.settings.json,

"ClamAv": {
    "Host": "",
    "Port": 0,
    "UseHealthCheck": true
}

...and register.

services
    .AddRequestVirusScan();

Next, register the middleware in the pipeline, as shown below.

applicationBuilder
    .UseRequestVirusScan();

The middleware is now configured in the pipeline, and all uploaded file will be scaned for virusses.


Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Vivet.AspNetCore.RequestVirusScan:

Package Downloads
NanoCore

The project is inspired by years of tedious repetitions, continuously re-writing similar code-snippets and libraries, to handle common functionality, not related to the business domain, such as logging, data persistence, message queuing, documentation, validation and similar.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.0.0 111 12/10/2024
0.1.1 1,823 8/29/2024
0.1.0 106 8/29/2024

- Updated to .NET 9.