ismartcoding / plain-app

PlainApp is an open-source application that allows you to manage your phone through a web browser. Access files, videos, music, contacts, sms, calls, and more from your desktop using a secure, easy to use web interface!
https://docs.plain.icu
GNU Affero General Public License v3.0
2.46k stars 125 forks source link

Add a health check endpoint #182

Closed anoop-b closed 2 months ago

anoop-b commented 2 months ago

Is your feature request related to a problem? Please describe. Exposing a route like/healthz can help with monitoring services

Describe the solution you'd like a /healthz endpoint that returns 200 OK

ismartcoding commented 2 months ago

Check this URL: http(s)://{ip}:{port}/health_check

anoop-b commented 2 months ago

Thank you, this helps.

Although i would prefer returning just "OK" or something similar, instead of the com.ismartcoding.plain . It's an avoidable attack vector, what do you think?

ismartcoding commented 2 months ago

The ID com.ismartcoding.plain is simply an application identifier used to differentiate between the debug version and the production version of the app for the HTTP server process. It has no relation to any form of attack.