From dfbbad21d0ffb35a0b219b468ea9fdae23c817f9 Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Wed, 14 Apr 2021 16:58:21 +0300 Subject: [PATCH] change no auth status --- server/web/api/stream.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/web/api/stream.go b/server/web/api/stream.go index 51adec0..c87f0a4 100644 --- a/server/web/api/stream.go +++ b/server/web/api/stream.go @@ -156,7 +156,8 @@ func streamNoAuth(c *gin.Context) { tor := torr.GetTorrent(spec.InfoHash.HexString()) if tor == nil { - c.AbortWithStatus(http.StatusForbidden) + c.Header("WWW-Authenticate", "Basic realm=Authorization Required") + c.AbortWithStatus(http.StatusUnauthorized) return }