File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -156,17 +156,17 @@ func (h *AuthHandler) handleProtectedResource(w http.ResponseWriter, r *http.Req
156156}
157157
158158// GetEffectiveResourcePath returns the resource path for OAuth protected resource URLs.
159- // It checks for the X-GitHub-Original-Path header set by copilot-api (CAPI) , which contains
159+ // It checks for the X-GitHub-Original-Path header set by GitHub , which contains
160160// the exact path the client requested before the /mcp prefix was stripped.
161- // If the header is not present (e.g., direct access or older CAPI versions) , it falls back to
161+ // If the header is not present, it falls back to
162162// restoring the /mcp prefix.
163163func GetEffectiveResourcePath (r * http.Request ) string {
164- // Check for the original path header from copilot-api (preferred method)
164+ // Check for the original path header from GitHub (preferred method)
165165 if originalPath := r .Header .Get (headers .OriginalPathHeader ); originalPath != "" {
166166 return originalPath
167167 }
168168
169- // Fallback: copilot-api strips /mcp prefix, so we need to restore it for the external URL
169+ // Fallback: GitHub strips /mcp prefix, so we need to restore it for the external URL
170170 if r .URL .Path == "/" {
171171 return "/mcp"
172172 }
You can’t perform that action at this time.
0 commit comments