Merge remote-tracking branch 'origin/260201-readonly' into beta

# Conflicts:
#	README.md
#	www/index.html
This commit is contained in:
Sergey Krashevich
2026-03-10 23:58:57 +03:00
28 changed files with 550 additions and 9 deletions
+14
View File
@@ -12,6 +12,13 @@ import (
func apiStreams(w http.ResponseWriter, r *http.Request) {
w = creds.SecretResponse(w)
if api.IsReadOnly() {
switch r.Method {
case "PUT", "PATCH", "POST", "DELETE":
api.ReadOnlyError(w)
return
}
}
query := r.URL.Query()
src := query.Get("src")
@@ -130,6 +137,13 @@ func apiStreamsDOT(w http.ResponseWriter, r *http.Request) {
}
func apiPreload(w http.ResponseWriter, r *http.Request) {
if api.IsReadOnly() {
switch r.Method {
case "PUT", "DELETE":
api.ReadOnlyError(w)
return
}
}
// GET - return all preloads
if r.Method == "GET" {
api.ResponseJSON(w, GetPreloads())