diff options
author | RazCrimson <bharathvigneshjo@gmail.com> | 2024-06-18 05:38:14 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 05:38:14 +0530 |
commit | f9915d93e80069c8b40f507396fa738e9627d942 (patch) | |
tree | 6d95b78ffee88848590629f346cd4895651a4264 | |
parent | 8c520e1d94f018440eb543d6b040450a7762c51b (diff) | |
parent | 69c3a948babfe3f9e5ec3114472c804986725f11 (diff) |
Merge pull request #2842 from nicolargo/2841-glances-api-status-check-returns-error-405-method-not-allowed
fix: RESTful API - HEAD request not supported on `{version}/status` as mentioned in docs
-rw-r--r-- | glances/outputs/glances_restful_api.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/glances/outputs/glances_restful_api.py b/glances/outputs/glances_restful_api.py index a4e8dcfe..c7f0490a 100644 --- a/glances/outputs/glances_restful_api.py +++ b/glances/outputs/glances_restful_api.py @@ -185,6 +185,7 @@ class GlancesRestfulApi: router.add_api_route( f'/api/{self.API_VERSION}/status', status_code=status.HTTP_200_OK, + methods=['HEAD', 'GET'], response_class=ORJSONResponse, endpoint=self._api_status, ) |