prevent client looping if server is down

This commit is contained in:
sbwalker
2023-07-17 11:49:06 -04:00
parent 985d324593
commit 92595ccc35

View File

@ -66,7 +66,7 @@ namespace Oqtane.Services
// legacy support for ControllerRoutes.Default // legacy support for ControllerRoutes.Default
if (alias != null) if (alias != null)
{ {
// include the alias for multi-tenant context // include the alias id for multi-tenant context
apiurl += $"{alias.AliasId}/"; apiurl += $"{alias.AliasId}/";
} }
else else
@ -223,7 +223,7 @@ namespace Oqtane.Services
private async Task Log(string uri, string method, string status, string message, params object[] args) private async Task Log(string uri, string method, string status, string message, params object[] args)
{ {
if (_siteState.Alias != null) if (_siteState.Alias != null && !uri.StartsWith(CreateApiUrl("Log")))
{ {
var log = new Log(); var log = new Log();
log.SiteId = _siteState.Alias.SiteId; log.SiteId = _siteState.Alias.SiteId;