File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ private static async Task Main(string[] args)
3535
3636 bool isDevelopment = builder . Environment . IsDevelopment ( ) ;
3737 _ = Boolean . TryParse ( builder . WebHost . GetSetting ( "UseIISIntegration" ) , out bool runningInIIS ) ;
38+ const string mcpPath = "/mcp" ;
3839
3940 void ConfigureLogging ( ILoggingBuilder logging )
4041 {
@@ -141,7 +142,7 @@ void ConfigureLogging(ILoggingBuilder logging)
141142
142143 x . ResourceMetadata = new ProtectedResourceMetadata
143144 {
144- Resource = resource ,
145+ Resource = new Uri ( resource , new Uri ( mcpPath , UriKind . Relative ) ) ,
145146 AuthorizationServers = { new Uri ( authenticationOptions . Authority ) } ,
146147 ScopesSupported = [ "openid" ] ,
147148 ResourceName = $ "{ hostingOptions . EnvironmentName ?? "Dibix" } MCP Server",
@@ -193,8 +194,6 @@ void ConfigureLogging(ILoggingBuilder logging)
193194 logger . LogInformation ( "Application running at address: {applicationBase address}" , hostingOptions . ApplicationBaseAddress ?? "/" ) ;
194195 logger . LogInformation ( "Additional path prefix: {additionalPathPrefix}" , hostingOptions . AdditionalPathPrefix ?? "<none>" ) ;
195196
196- const string mcpPath = "/mcp" ;
197-
198197 if ( hostingOptions . AdditionalPathPrefix != null )
199198 {
200199 app . UsePathBase ( hostingOptions . AdditionalPathPrefix ) ;
You can’t perform that action at this time.
0 commit comments