Disable caching of some GET apis. Closes #1530

This commit is contained in:
Gabe Kangas
2021-11-16 20:58:03 -08:00
parent dc664af3c0
commit 1873151390
5 changed files with 13 additions and 3 deletions

View File

@@ -37,8 +37,6 @@ func GetChatMessages(w http.ResponseWriter, r *http.Request) {
// RegisterAnonymousChatUser will register a new user.
func RegisterAnonymousChatUser(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
if r.Method != POST {
WriteSimpleResponse(w, false, r.Method+" not supported")
return
@@ -72,5 +70,8 @@ func RegisterAnonymousChatUser(w http.ResponseWriter, r *http.Request) {
DisplayName: newUser.DisplayName,
}
w.Header().Set("Content-Type", "application/json")
middleware.DisableCache(w)
WriteResponse(w, response)
}