Fix swagger json route for hosting.

This commit is contained in:
2022-05-17 07:21:45 -05:00
parent 0ef9449c77
commit b3e0d154bd

View File

@@ -180,6 +180,12 @@ namespace Gameboard.ShogiUI.Sockets
ClientId = "c1e94676-cab0-42ba-8b6c-9532b8486fff", ClientId = "c1e94676-cab0-42ba-8b6c-9532b8486fff",
UsePkceWithAuthorizationCodeGrant = true UsePkceWithAuthorizationCodeGrant = true
}; };
config.TransformToExternalPath = (route, request) =>
{
return request.Host.HasValue && request.Host.Value.Contains("localhost")
? route
: $"/Gameboard.ShogiUI.Sockets{route}";
};
//config.WithCredentials = true; //config.WithCredentials = true;
}) })
.UseWebSockets(socketOptions) .UseWebSockets(socketOptions)