Skip to content

Commit be147d2

Browse files
committed
Fix caching and add test app to attributes feature allow list
1 parent b39942c commit be147d2

File tree

2 files changed

+10
-11
lines changed
  • src
    • frontend/src/lib/legacy/flows/dappsExplorer
    • internet_identity_frontend/src

2 files changed

+10
-11
lines changed

src/frontend/src/lib/legacy/flows/dappsExplorer/dapps.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,13 @@
631631
"name": "Demo App",
632632
"oneLiner": "Experience next-gen decentralized authentication.",
633633
"website": "https://try.id.ai",
634-
"logo": "try-id-ai.svg"
634+
"authOrigins": [
635+
"https://try.id.ai",
636+
"https://vt36r-2qaaa-aaaad-aad5a-cai.icp0.io",
637+
"https://4mteh-mqaaa-aaaad-adnaa-cai.icp0.io"
638+
],
639+
"logo": "try-id-ai.svg",
640+
"certified_attributes": true
635641
},
636642
{
637643
"name": "Caffeine",
@@ -645,12 +651,5 @@
645651
"logo": "caffeine_logo.svg",
646652
"logoDark": "caffeine_logo_dark.svg",
647653
"certified_attributes": true
648-
},
649-
{
650-
"name": "Direct OpenID Sign-In",
651-
"oneLiner": "Direct OpenID sign-in test app",
652-
"website": "https://4mteh-mqaaa-aaaad-adnaa-cai.icp0.io",
653-
"logo": "try-id-ai.svg",
654-
"certified_attributes": true
655654
}
656655
]

src/internet_identity_frontend/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ fn certify_all_assets(args: InternetIdentityFrontendArgs) {
123123
vec![AssetEncoding::Identity.default_config()]
124124
};
125125

126-
let headers = if path.starts_with("_app/immutable") {
126+
let headers = if path.starts_with("/_app/immutable") {
127127
(
128128
"cache-control".to_string(),
129129
IMMUTABLE_ASSET_CACHE_CONTROL.to_string(),
@@ -335,7 +335,7 @@ fn get_static_assets(config: &InternetIdentityFrontendArgs) -> Vec<AssetUtilAsse
335335

336336
// Serve the initialization argument of this canister as a Candid file
337337
assets.push(AssetUtilAsset {
338-
url_path: "/.config.txt".to_string(),
338+
url_path: "/.config".to_string(),
339339
content: IDLValue::try_from_candid_type(config)
340340
.unwrap()
341341
.to_string()
@@ -380,7 +380,7 @@ fn fixup_html(html: &str, config: &InternetIdentityFrontendArgs) -> String {
380380
let html = html.replace(
381381
"</head>",
382382
&format!(
383-
r#"<link rel="preload" href="{backend_origin}/.config.did.bin" as="fetch"></head>"#,
383+
r#"<link rel="preload" href="{backend_origin}/.config.did.bin" crossorigin="anonymous" fetchpriority="high" as="fetch"></head>"#,
384384
),
385385
);
386386

0 commit comments

Comments
 (0)