diff --git a/editor/editors.go b/editor/editors.go index 001e9ca..d1d6fa5 100644 --- a/editor/editors.go +++ b/editor/editors.go @@ -37,6 +37,11 @@ var logger = gulu.Log.NewLogger(os.Stdout) // AutocompleteHandler handles request of code autocompletion. func AutocompleteHandler(w http.ResponseWriter, r *http.Request) { + if conf.Wide.ReadOnly { + http.Error(w, "Forbidden", http.StatusForbidden) + return + } + var args map[string]interface{} if err := json.NewDecoder(r.Body).Decode(&args); err != nil { logger.Error(err)