@@ -118,10 +118,10 @@ func main() {
118118 // Setup API key for secure communication between tray and core
119119 if trayAPIKey == "" {
120120 // Check environment variable first (for consistency with core behavior)
121- if envAPIKey := os .Getenv ("MCPP_API_KEY " ); envAPIKey != "" {
121+ if envAPIKey := os .Getenv ("MCPPROXY_API_KEY " ); envAPIKey != "" {
122122 trayAPIKey = envAPIKey
123123 logger .Info ("Using API key from environment variable for tray-core communication" ,
124- zap .String ("api_key_source" , "MCPP_API_KEY environment variable" ),
124+ zap .String ("api_key_source" , "MCPPROXY_API_KEY environment variable" ),
125125 zap .String ("api_key_prefix" , maskAPIKey (trayAPIKey )))
126126 } else {
127127 trayAPIKey = generateAPIKey ()
@@ -887,18 +887,23 @@ func (cpl *CoreProcessLauncher) handleShutdown() {
887887func (cpl * CoreProcessLauncher ) buildCoreEnvironment () []string {
888888 env := os .Environ ()
889889
890- // Filter out any existing MCPP_API_KEY to avoid conflicts
890+ // Filter out any existing MCPPROXY_API_KEY to avoid conflicts
891891 filtered := make ([]string , 0 , len (env ))
892892 for _ , envVar := range env {
893- if ! strings .HasPrefix (envVar , "MCPP_API_KEY =" ) {
893+ if ! strings .HasPrefix (envVar , "MCPPROXY_API_KEY =" ) {
894894 filtered = append (filtered , envVar )
895895 }
896896 }
897897
898898 // Add our environment variables
899899 filtered = append (filtered ,
900- "MCPP_ENABLE_TRAY=false" ,
901- fmt .Sprintf ("MCPP_API_KEY=%s" , trayAPIKey ))
900+ "MCPPROXY_ENABLE_TRAY=false" ,
901+ fmt .Sprintf ("MCPPROXY_API_KEY=%s" , trayAPIKey ))
902+
903+ // Pass through TLS configuration if set
904+ if tlsEnabled := strings .TrimSpace (os .Getenv ("MCPPROXY_TLS_ENABLED" )); tlsEnabled != "" {
905+ filtered = append (filtered , fmt .Sprintf ("MCPPROXY_TLS_ENABLED=%s" , tlsEnabled ))
906+ }
902907
903908 return filtered
904909}
0 commit comments