benzino77 / clamav-rest-api

ClamAV REST API. Scan files using simple POST request.
MIT License
105 stars 37 forks source link

Error when calling / #56

Closed phlegx closed 2 months ago

phlegx commented 2 months ago

HI there, When calling the service with curl like:

curl -s clamav-api-service.clamav.svc.cluster.local:3000

I get back:

{"success":false,"data":{"error":"Not allowed."}}

Should't that give me the version? I mean the API is up and running.

https://github.com/benzino77/clamav-rest-api/blob/e10759250b3c9f2ab806d2760287da1df1702c22/src/routes/version.js#L28

Thanks Martin

phlegx commented 2 months ago

I finally read the documentation and found out that this is the endpoint where you can get the version back:

GET /api/v1/version

This endpoint can also serve fore liveness and readiness checks in the deployment.

benzino77 commented 2 months ago

Exactly. But maybe it is not the worst idea to add dedicated endpoints for readiness, etc.. I will have a look at this after I get back from my vacation.

phlegx commented 1 month ago

Hi @benzino77 yes for sure that would be nice to have! Let me know when it is implemented!