File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1+ --- 
2+ " trigger.dev "  : patch 
3+ --- 
4+ 
5+ fix: add user-agent to the websocket request
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import { logger } from "../utilities/logger.js";
2626import  {  resolveSourceFiles  }  from  "../utilities/sourceFiles.js" ; 
2727import  {  BackgroundWorker ,  BackgroundWorkerCoordinator  }  from  "./backgroundWorker.js" ; 
2828import  {  sanitizeEnvVars  }  from  "../utilities/sanitizeEnvVars.js" ; 
29+ import  {  VERSION  }  from  "../version.js" ; 
2930
3031export  interface  WorkerRuntime  { 
3132  shutdown ( ) : Promise < void > ; 
@@ -325,7 +326,13 @@ class DevWorkerRuntime implements WorkerRuntime {
325326function  WebsocketFactory ( apiKey : string )  { 
326327  return  class  extends  wsWebSocket  { 
327328    constructor ( address : string  |  URL ,  options ?: ClientOptions  |  ClientRequestArgs )  { 
328-       super ( address ,  {  ...( options  ??  { } ) ,  headers : {  Authorization : `Bearer ${ apiKey }  `  }  } ) ; 
329+       super ( address ,  { 
330+         ...( options  ??  { } ) , 
331+         headers : { 
332+           Authorization : `Bearer ${ apiKey }  ` , 
333+           "User-Agent" : `trigger.dev-cli/${ VERSION }  ` , 
334+         } , 
335+       } ) ; 
329336    } 
330337  } ; 
331338} 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments