File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -14,17 +14,12 @@ func WithRequestConfig(next http.Handler) http.Handler {
1414 return http .HandlerFunc (func (w http.ResponseWriter , r * http.Request ) {
1515 ctx := r .Context ()
1616
17- // Only set from headers if not already set in ctx
18- if ! ghcontext .IsReadonly (ctx ) {
19- if relaxedParseBool (r .Header .Get (headers .MCPReadOnlyHeader )) {
20- ctx = ghcontext .WithReadonly (ctx , true )
21- }
17+ if relaxedParseBool (r .Header .Get (headers .MCPReadOnlyHeader )) {
18+ ctx = ghcontext .WithReadonly (ctx , true )
2219 }
2320
24- if len (ghcontext .GetToolsets (ctx )) == 0 {
25- if toolsets := headers .ParseCommaSeparated (r .Header .Get (headers .MCPToolsetsHeader )); len (toolsets ) > 0 {
26- ctx = ghcontext .WithToolsets (ctx , toolsets )
27- }
21+ if toolsets := headers .ParseCommaSeparated (r .Header .Get (headers .MCPToolsetsHeader )); len (toolsets ) > 0 {
22+ ctx = ghcontext .WithToolsets (ctx , toolsets )
2823 }
2924
3025 next .ServeHTTP (w , r .WithContext (ctx ))
You can’t perform that action at this time.
0 commit comments