libreconnect / backend

MIT License
12 stars 0 forks source link

Implementation/healthcheck #23

Closed NathaelB closed 2 months ago

NathaelB commented 2 months ago

This PR introduces a health-check module to monitor the application's status via two new endpoints: /health/live and /health/readiness. These endpoints are protected by a security middleware that verifies the presence and correctness of a custom header (x-monitoring-secret). Access to these endpoints is granted only when the header matches the application's secret key (APP_KEY).

Changes Made

Tests

Security Considerations

Ensured that the health-check endpoints are not accessible without the correct secret, thus protecting potentially sensitive information about the application's state.