![]() |
![]() |
![]() |
Cockpit Guide | ![]() |
---|
When embedding Cockpit, it may be necessary to check whether Cockpit is available on a server before displaying the embedded Cockpit frame.
To do this perform a /ping
requset to Cockpit. This is a simple HTTP
GET request. It returns the following:
GET: https://server.example.com:9090/ping 200 OK: { "service": "cockpit" }
The /ping
request allows
Cross Origin Resource Sharing
headers and as such can be performed from Javascript code with any origin. The reqeust can also be
made via plain HTTP without SSL.
It is by design that no further information is present in the response.