Skip to content

Commit 6d586d1

Browse files
committed
Debug more
Signed-off-by: Daishan Peng <[email protected]>
1 parent d367759 commit 6d586d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,7 @@ func (p *OAuthProxy) mcpProxyHandler(c *gin.Context) {
11301130
}
11311131

11321132
// Forward original headers
1133+
fmt.Println(c.Request.Header)
11331134
for key, values := range c.Request.Header {
11341135
if strings.ToLower(key) != "authorization" { // Don't forward our Bearer token
11351136
for _, value := range values {
@@ -1142,7 +1143,7 @@ func (p *OAuthProxy) mcpProxyHandler(c *gin.Context) {
11421143
},
11431144
ErrorHandler: func(w http.ResponseWriter, r *http.Request, err error) {
11441145
log.Printf("Proxy error: %v", err)
1145-
c.Abort()
1146+
c.AbortWithStatus(http.StatusBadGateway)
11461147
},
11471148
}
11481149

0 commit comments

Comments
 (0)