Skip to content

Commit 291c7ec

Browse files
Update src/ModelContextProtocol.AspNetCore/Authentication/McpAuthenticationHandler.cs
Co-authored-by: Stephen Toub <[email protected]>
1 parent bb25dbd commit 291c7ec

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/ModelContextProtocol.AspNetCore/Authentication/McpAuthenticationHandler.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,7 @@ private async Task HandleResourceMetadataRequestAsync()
9797
};
9898

9999
// Set default resource if not set
100-
if (metadata.Resource == null)
101-
{
102-
metadata.Resource = new Uri(GetBaseUrl());
103-
}
100+
metadata.Resource ??= new Uri(GetBaseUrl());
104101

105102
Response.StatusCode = StatusCodes.Status200OK;
106103
Response.ContentType = "application/json";

0 commit comments

Comments
 (0)