헤더에 세션키 없으면 실패

This commit is contained in:
2024-08-13 16:30:42 +09:00
parent d5fa86b378
commit 4dfc070891

View File

@ -729,6 +729,11 @@ func (ws *WebsocketHandler) upgrade(w http.ResponseWriter, r *http.Request) {
}()
sk := r.Header.Get("AS-X-SESSION")
if len(sk) == 0 {
w.WriteHeader(http.StatusUnauthorized)
return
}
authinfo, err := ws.sessionConsumer.Query(sk)
if err != nil {
w.WriteHeader(http.StatusInternalServerError)