Repository navigation
docs(exapp): how HaRP and the ExApp proxy match routes - #15980
Conversation
📖 Documentation Preview📄 3 changed documentation pagesLast updated: Sat, 07 Nov 2026 13:34:52 GMT |
21aeadc to
745ce51
Compare
Signed-off-by: Oleksandr Piskun <oleksandr2088@icloud.com>
745ce51 to
7c49667
Compare
kyteinsky
left a comment
There was a problem hiding this comment.
looks good!
left a couple small comments below.
| The ``GET /heartbeat`` method is called periodically by Nextcloud to check the ExApp health status, | ||
| i.e. if its webserver is running and receiving requests. | ||
| AppAPI calls ``GET /heartbeat`` after installing, updating or enabling the ExApp, until it answers, | ||
| to check that its web server is running. |
There was a problem hiding this comment.
| The ``GET /heartbeat`` method is called periodically by Nextcloud to check the ExApp health status, | |
| i.e. if its webserver is running and receiving requests. | |
| AppAPI calls ``GET /heartbeat`` after installing, updating or enabling the ExApp, until it answers, | |
| to check that its web server is running. | |
| AppAPI calls ``GET /heartbeat`` periodically after installing or updating the ExApp, until it answers, to check if its web server is up and running. |
maybe this feels better since "enabling" would mean the step after heartbeat and init
There was a problem hiding this comment.
Enabling runs it too: AppAPI starts the container and waits for /heartbeat before PUT /enabled, also when a disabled ExApp is enabled again. I changed "after" to "when" so it doesn't read as the step after enabling, and took "periodically" and "up and running" from your suggestion.
| Other methods get ``405``, except ``404`` from the ExApp proxy for the ones it serves: ``GET``, ``HEAD``, ``POST``, ``PUT``, ``DELETE``. | ||
| HaRP applies the highest access level among the readings of a path (letter case, a trailing slash, ``;`` parameters, an escaped ``/``), so write a route for a directory as ``^/img(/.*)?$``. |
There was a problem hiding this comment.
maybe these two lines can be explained in more detail, with some examples for the first line, so it's easier to not misunderstand it.
There was a problem hiding this comment.
Added an example with three routes and what each request gets. The readings line now names the ExApp proxy too, since it checks them as well now.
Signed-off-by: Oleksandr Piskun <oleksandr2088@icloud.com>
… headers Signed-off-by: Oleksandr Piskun <oleksandr2088@icloud.com>
| - ``GET /api/items`` needs a user: the ``USER`` route comes before ``.*``. | ||
| - ``DELETE /api/items`` gets ``405`` from HaRP and ``404`` from the ExApp proxy; ``PATCH /api/items`` gets ``405`` from both. | ||
| - ``GET /IMG/logo.png`` needs an admin: in this letter case only ``.*`` matches it. | ||
| - With ``^/img/.*`` as the first route, ``GET /img/`` would need an admin: without the trailing slash only ``.*`` matches it, so write a route for a directory as ``^/img(/.*)?$``. |
There was a problem hiding this comment.
| - With ``^/img/.*`` as the first route, ``GET /img/`` would need an admin: without the trailing slash only ``.*`` matches it, so write a route for a directory as ``^/img(/.*)?$``. | |
| - With ``^/img/.*`` as the first route, ``GET /img/`` would need an admin since the check will be performed against ``GET /img/`` and ``GET /img`` (without the trailing slash). Which is matched by ``.*`` only, so write a route for a directory as ``^/img(/.*)?$``. |
There was a problem hiding this comment.
had understood a bit wrong before, edited.
does this sound good?
|
/backport to stable35 |
|
/backport to stable34 |
|
/backport to stable33 |
The routes page does not say how a request is matched against the routes. The lifecycle page says that
/heartbeatis called periodically, while AppAPI only calls it after installing, updating or enabling an ExApp, and the deployment page gives a 90 second heartbeat timeout instead of 10 minutes. The routes page now has a short Matching section.