mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-07-04 03:42:56 +00:00
Improved enterprise IT checks when run without such an environment (#494)
This commit is contained in:
parent
6979a73e5c
commit
ce915292dc
@ -7,6 +7,9 @@ public static partial class PluginFactory
|
||||
{
|
||||
public static async Task<EntityTagHeaderValue?> DetermineConfigPluginETagAsync(Guid configPlugId, string configServerUrl, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if(configPlugId == Guid.Empty || string.IsNullOrWhiteSpace(configServerUrl))
|
||||
return null;
|
||||
|
||||
try
|
||||
{
|
||||
var serverUrl = configServerUrl.EndsWith('/') ? configServerUrl[..^1] : configServerUrl;
|
||||
|
@ -54,6 +54,7 @@ public sealed class EnterpriseEnvironmentService(ILogger<EnterpriseEnvironmentSe
|
||||
switch (enterpriseConfigServerUrl)
|
||||
{
|
||||
case null when enterpriseConfigId == Guid.Empty:
|
||||
case not null when string.IsNullOrWhiteSpace(enterpriseConfigServerUrl) && enterpriseConfigId == Guid.Empty:
|
||||
logger.LogInformation("AI Studio runs without an enterprise configuration.");
|
||||
break;
|
||||
|
||||
@ -61,7 +62,7 @@ public sealed class EnterpriseEnvironmentService(ILogger<EnterpriseEnvironmentSe
|
||||
logger.LogWarning($"AI Studio runs with an enterprise configuration id ('{enterpriseConfigId}'), but the configuration server URL is not set.");
|
||||
break;
|
||||
|
||||
case not null when enterpriseConfigId == Guid.Empty:
|
||||
case not null when !string.IsNullOrWhiteSpace(enterpriseConfigServerUrl) && enterpriseConfigId == Guid.Empty:
|
||||
logger.LogWarning($"AI Studio runs with an enterprise configuration server URL ('{enterpriseConfigServerUrl}'), but the configuration ID is not set.");
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user