Disable flush_logs endpoint inside docker containers#2656
Disable flush_logs endpoint inside docker containers#2656rdwebdesign wants to merge 2 commits intodevelopmentfrom
Conversation
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
|
Does it really need a restart when triggered via the API? At least on bare metal it does not perfome a restart But as I said in the other PR: we might want to disable FTL restart option via API when running on docker. |
|
FTL can restart just fine in |
What do the logs show? |
|
@rdwebdesign I am setting this back to draft. It seems there are a few things we need to clarify before this can be merged (including if this change is needed at all) |
Yes. I'm not sure if this is needed at all. Apparently we need to change how Web handles some things and not try to use |
What does this PR aim to accomplish?
The flush process needs a FTL restart, but this is not possible inside docker containers (not enough permissions). Currently, if the API endpoint is called inside a container, it returns "success" and FTL logs success messages, but in reality FTL is never restarted and the process is not correctly completed.
This PR effectively disables the
flush_logsendpoint when FTL is inside a container. Inside containers the API will respond with403 forbidden.This is related to: pi-hole/pi-hole#6391
How does this PR accomplish the above?
FTL checks if it is running inside docker and, if so, returns a 403 error message.
By submitting this pull request, I confirm the following:
git rebase)