core: Reloading with SIGUSR1 if config never changed via admin (#7258)

This commit is contained in:
Francis Lavoie
2025-09-26 12:50:15 -04:00
committed by GitHub
parent b2ab419922
commit 65e0ddc221
7 changed files with 167 additions and 20 deletions

View File

@@ -1029,6 +1029,13 @@ func handleConfig(w http.ResponseWriter, r *http.Request) error {
return err
}
// If this request changed the config, clear the last
// config info we have stored, if it is different from
// the original source.
ClearLastConfigIfDifferent(
r.Header.Get("Caddy-Config-Source-File"),
r.Header.Get("Caddy-Config-Source-Adapter"))
default:
return APIError{
HTTPStatus: http.StatusMethodNotAllowed,