Skip to content

Commit e02e1ca

Browse files
Fix missing mandatory WWW-Authenticate header
1 parent 723316d commit e02e1ca

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • event-gateway/gateway-runtime/internal/connectors/receiver/websub

event-gateway/gateway-runtime/internal/connectors/receiver/websub/handler.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,9 @@ func writePolicyResponse(w http.ResponseWriter, msg *connectors.Message, fallbac
379379
w.WriteHeader(statusCode)
380380
return
381381
}
382+
if fallbackStatus == http.StatusUnauthorized {
383+
w.Header().Set("WWW-Authenticate", `Bearer realm="event-gateway"`)
384+
}
382385
http.Error(w, fallbackBody, fallbackStatus)
383386
}
384387

0 commit comments

Comments
 (0)