Skip to content

Commit c96da56

Browse files
Allow Staging API URL usage in production mode (#78)
1 parent 315cf46 commit c96da56

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/ByteSync.Client/Services/Communications/ConnectionConstantsService.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ private string SetApiUrl()
4949
{
5050
if (_environmentService.ExecutionMode == ExecutionMode.Regular)
5151
{
52+
if (_environmentService.Arguments.Contains(RegularArguments.CF_API_URL_STAGING))
53+
{
54+
_logger.LogWarning("*** Staging API URL is used, but the application is running in production mode ***");
55+
return _configuration["StagingUrl"]!;
56+
}
57+
5258
return _configuration["ProductionUrl"]!;
5359
}
5460
else

0 commit comments

Comments
 (0)