diff --git a/internal/controller/proxy_controller.go b/internal/controller/proxy_controller.go index 26975fab..95afe113 100644 --- a/internal/controller/proxy_controller.go +++ b/internal/controller/proxy_controller.go @@ -144,9 +144,9 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) { if !controller.useBrowserResponse(proxyCtx) { c.Header("x-tinyauth-location", redirectURL) - c.JSON(401, gin.H{ - "status": 401, - "message": "Unauthorized", + c.JSON(403, gin.H{ + "status": 403, + "message": "Forbidden", }) return } @@ -190,9 +190,9 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) { if !controller.useBrowserResponse(proxyCtx) { c.Header("x-tinyauth-location", redirectURL) - c.JSON(401, gin.H{ - "status": 401, - "message": "Unauthorized", + c.JSON(403, gin.H{ + "status": 403, + "message": "Forbidden", }) return } @@ -234,9 +234,9 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) { if !controller.useBrowserResponse(proxyCtx) { c.Header("x-tinyauth-location", redirectURL) - c.JSON(401, gin.H{ - "status": 401, - "message": "Unauthorized", + c.JSON(403, gin.H{ + "status": 403, + "message": "Forbidden", }) return }