File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/ServiceControl.Audit.Persistence.RavenDB Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,21 @@ internal static DatabaseConfiguration GetDatabaseConfiguration(PersistenceSettin
100100 throw new InvalidOperationException ( $ "{ DatabaseMaintenancePortKey } must be an integer.") ;
101101 }
102102
103- var serverUrl = $ "http://{ settings . Hostname } :{ databaseMaintenancePort } ";
103+ // Determine host for embedded RavenDB from persister-specific settings
104+ string host = "localhost" ;
105+
106+ if ( settings . PersisterSpecificSettings . TryGetValue ( "ServiceControl.Audit/HostName" , out var configuredHost ) ||
107+ settings . PersisterSpecificSettings . TryGetValue ( "ServiceControl/HostName" , out configuredHost ) )
108+ {
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+ }
115+ }
116+
117+ var serverUrl = $ "http://{ host } :{ databaseMaintenancePort } ";
104118
105119 var logPath = GetLogPath ( settings ) ;
106120
You can’t perform that action at this time.
0 commit comments