feat: add ability to disable specific routes (#119)

This commit is contained in:
2023-12-15 14:34:03 +02:00
committed by GitHub
parent 5ddc08fce7
commit e51d91740d
19 changed files with 128 additions and 21 deletions

View File

@ -129,6 +129,7 @@ Web server settings. If any of ``host``/``port`` is not set, web integration wil
* ``index_url`` - full url of the repository index page, string, optional.
* ``max_body_size`` - max body size in bytes to be validated for archive upload, integer, optional. If not set, validation will be disabled.
* ``port`` - port to bind, integer, optional.
* ``service_only`` - disable status routes (including logs), boolean, optional, default ``no``.
* ``static_path`` - path to directory with static files, string, required.
* ``templates`` - path to templates directories, space separated list of strings, required.
* ``unix_socket`` - path to the listening unix socket, string, optional. If set, server will create the socket on the specified address which can (and will) be used by application. Note, that unlike usual host/port configuration, unix socket allows to perform requests without authorization.

View File

@ -1052,7 +1052,7 @@ It is required to point to the master node repository, otherwise internal depend
Also, in case if authentication is enabled, the same user with the same password must be created for all workers.
It is also recommended to set ``web.wait_timeout`` to infinte in case of multiple conflicting runs.
It is also recommended to set ``web.wait_timeout`` to infinite in case of multiple conflicting runs and ``service_only`` to ``yes`` in order to disable status endpoints.
Other settings are the same as mentioned above.
@ -1107,6 +1107,9 @@ Worker nodes (applicable for all workers) config (``worker.ini``) as:
manual = yes
wait_timeout = 0
[web]
service_only = yes
[build]
triggers = ahriman.core.upload.UploadTrigger ahriman.core.report.ReportTrigger