mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
Add /api/action/gravity which can be used to trigger a run of pihole -g. The output is live streamed using HTTP/1.1 chunked encoding.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -50,6 +50,11 @@ if __name__ == "__main__":
|
||||
# matches the OpenAPI specs.
|
||||
print("Verifying the individual endpoint properties...")
|
||||
for path in openapi.endpoints["get"]:
|
||||
# We do not check the action endpoints as they'd trigger
|
||||
# possibly unwanted action such as restarting FTL, running
|
||||
# gravity, stutting down the system, etc.
|
||||
if path.startswith("/api/action"):
|
||||
continue
|
||||
verifyer = ResponseVerifyer(ftl, openapi)
|
||||
errors = verifyer.verify_endpoint(path)
|
||||
if len(errors) == 0:
|
||||
|
||||
Reference in New Issue
Block a user