Skip to content

tgglv/clamav-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClamAV Server

Simple API for scanning zip archives with the use of ClamAV.

How to run

# Run in project's root folder: 
$ docker run -d -p 9090:80 --name my-clamav-server timurns/clamav-server:latest

API Methods

Health Check
GET /v1/health-check.php

Returns: 200 OK.

Sample usage:

curl http://localhost:9090/v1/health-check.php
Scan for viruses
POST /v1/scan.php

Response:

If file is infected, it will return:

400 Bad Request

Body:
{
  "success": false,
  "message": "File is infected"
}

If file isn't infected, it will return:

200 OK

Body:
{
  "success": true,
  "message": "File is clean"
}

Sample usage:

curl --form 'file=@/path/to/file.zip' http://localhost:9090/v1/scan.php