File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
src/ServiceControl.Audit.Persistence.RavenDB Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change 11namespace ServiceControl . Audit . Persistence . RavenDB
22{
33 using System ;
4+ using System . Configuration ;
45 using System . Collections . Generic ;
56 using System . IO ;
67 using System . Reflection ;
@@ -100,20 +101,13 @@ internal static DatabaseConfiguration GetDatabaseConfiguration(PersistenceSettin
100101 throw new InvalidOperationException ( $ "{ DatabaseMaintenancePortKey } must be an integer.") ;
101102 }
102103
103- // Determine host for embedded RavenDB from persister-specific settings
104- string host = "localhost" ;
105104
106- if ( settings . PersisterSpecificSettings . TryGetValue ( "ServiceControl.Audit/HostName" , out var configuredHost ) ||
107- settings . PersisterSpecificSettings . TryGetValue ( "ServiceControl/HostName" , out configuredHost ) )
105+ string host = "localhost" ;
106+ if ( ! string . IsNullOrEmpty ( settings . Hostname ) )
108107 {
109- configuredHost = configuredHost ? . Trim ( ) ;
110- if ( ! string . IsNullOrWhiteSpace ( configuredHost ) )
111- {
112- // Map '*' to '+' for Raven wildcard (bind all interfaces). Accept '+' as-is.
113- host = configuredHost == "*" ? "+" : configuredHost ;
114- }
108+ // Map '*' to '+' for Raven wildcard (bind all interfaces). Accept '+' as-is.
109+ host = settings . Hostname == "*" ? "+" : settings . Hostname ;
115110 }
116-
117111 var serverUrl = $ "http://{ host } :{ databaseMaintenancePort } ";
118112
119113 var logPath = GetLogPath ( settings ) ;
You can’t perform that action at this time.
0 commit comments