File tree Expand file tree Collapse file tree 2 files changed +12
-31
lines changed
internet_identity_frontend/src Expand file tree Collapse file tree 2 files changed +12
-31
lines changed Original file line number Diff line number Diff line change @@ -91,23 +91,14 @@ pub fn get_static_assets(config: &InternetIdentityInit) -> Vec<Asset> {
9191
9292 // Required to make II available on the identity.internetcomputer.org domain.
9393 // See https://internetcomputer.org/docs/current/developer-docs/production/custom-domain/#custom-domains-on-the-boundary-nodes
94- let well_known_origins = config
95- . related_origins
96- . clone ( )
97- . unwrap_or_default ( )
98- . into_iter ( )
99- . flat_map ( |origin| {
100- let origin = origin. replace ( "https://" , "" ) ;
101- let beta_origin = format ! ( "beta.{origin}" ) ;
102- [ origin, beta_origin]
103- } )
104- . collect :: < Vec < String > > ( )
105- . join ( "\n " )
106- . into_bytes ( ) ;
107-
10894 assets. push ( Asset {
10995 url_path : "/.well-known/ic-domains" . to_string ( ) ,
110- content : well_known_origins,
96+ content : config
97+ . related_origins
98+ . clone ( )
99+ . unwrap_or_default ( )
100+ . join ( "\n " )
101+ . into_bytes ( ) ,
111102 encoding : ContentEncoding :: Identity ,
112103 content_type : ContentType :: OCTETSTREAM ,
113104 } ) ;
Original file line number Diff line number Diff line change @@ -322,24 +322,14 @@ fn get_static_assets(config: &InternetIdentityFrontendArgs) -> Vec<AssetUtilAsse
322322 } ) ;
323323
324324 // Add .well-known/ic-domains for custom domain support
325- let well_known_origins = config
326- . related_origins
327- . clone ( )
328- . unwrap_or_default ( )
329- . into_iter ( )
330- . flat_map ( |origin| {
331- let origin = origin. replace ( "https://" , "" ) ;
332- let beta_origin = format ! ( "beta.{origin}" ) ;
333- [ origin, beta_origin]
334- } )
335- . collect :: < Vec < String > > ( )
336- . join ( "\n " )
337- . into_bytes ( )
338- . to_vec ( ) ;
339-
340325 assets. push ( AssetUtilAsset {
341326 url_path : "/.well-known/ic-domains" . to_string ( ) ,
342- content : well_known_origins,
327+ content : config
328+ . related_origins
329+ . clone ( )
330+ . unwrap_or_default ( )
331+ . join ( "\n " )
332+ . into_bytes ( ) ,
343333 encoding : ContentEncoding :: Identity ,
344334 content_type : ContentType :: OCTETSTREAM ,
345335 } ) ;
You can’t perform that action at this time.
0 commit comments