Skip to content

Commit d4b4245

Browse files
committed
chore: revert 4c741a5 and use 403 for acl errors
1 parent 4c741a5 commit d4b4245

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

internal/controller/proxy_controller.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) {
144144

145145
if !controller.useBrowserResponse(proxyCtx) {
146146
c.Header("x-tinyauth-location", redirectURL)
147-
c.JSON(401, gin.H{
148-
"status": 401,
149-
"message": "Unauthorized",
147+
c.JSON(403, gin.H{
148+
"status": 403,
149+
"message": "Forbidden",
150150
})
151151
return
152152
}
@@ -190,9 +190,9 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) {
190190

191191
if !controller.useBrowserResponse(proxyCtx) {
192192
c.Header("x-tinyauth-location", redirectURL)
193-
c.JSON(401, gin.H{
194-
"status": 401,
195-
"message": "Unauthorized",
193+
c.JSON(403, gin.H{
194+
"status": 403,
195+
"message": "Forbidden",
196196
})
197197
return
198198
}
@@ -234,9 +234,9 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) {
234234

235235
if !controller.useBrowserResponse(proxyCtx) {
236236
c.Header("x-tinyauth-location", redirectURL)
237-
c.JSON(401, gin.H{
238-
"status": 401,
239-
"message": "Unauthorized",
237+
c.JSON(403, gin.H{
238+
"status": 403,
239+
"message": "Forbidden",
240240
})
241241
return
242242
}

0 commit comments

Comments
 (0)