File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed 
AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/SPI Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 77
88import  Foundation
99
10+ private  let  ISO_PARTITION_BASE_DOMAIN :  String  =  " csp.hci.ic.gov " 
11+ private  let  DEFAULT_BASE_DOMAIN :  String  =  " amazonaws.com " 
12+ 
1013func  streamingSessionURL( for region:  String )  throws  ->  URL  { 
11-     let  urlString  =  " wss://streaming-rekognition. \( region) .amazonaws.com/start-face-liveness-session-websocket " 
14+ 
15+     // Determine the base domain based on the region
16+     let  baseDomain :  String 
17+     if  region. lowercased ( ) . starts ( with:  " us-isof " )  { 
18+         baseDomain =  ISO_PARTITION_BASE_DOMAIN
19+     }  else  { 
20+         baseDomain =  DEFAULT_BASE_DOMAIN
21+     } 
22+ 
23+     let  urlString  =  " wss://streaming-rekognition. \( region) . \( baseDomain) /start-face-liveness-session-websocket " 
1224    guard  let  url =  URL ( string:  urlString)  else  { 
1325        throw  FaceLivenessSessionError . invalidRegion
1426    } 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments