nlopes / actix-web-prom

Actix-web middleware to expose Prometheus metrics
MIT License
89 stars 56 forks source link

How to secure an endpoint? #81

Closed DenuxPlays closed 4 months ago

DenuxPlays commented 5 months ago

Hey, How can I secure the metrics endpoint? Or just but a wrapper around it?

nlopes commented 4 months ago

Hey @DenuxPlays I think this is outside of the scope of actix-web-prom. You probably want to add https to your actix-web deployment. Check more here.

DenuxPlays commented 4 months ago

Hey @DenuxPlays I think this is outside of the scope of actix-web-prom. You probably want to add https to your actix-web deployment. Check more here.

That was not what I meant. I meant to secure it with credentials so that the endpoint is not public. But maybe this can be achieved with actix when I wrap a guard around it. Have to test it though.