From 4b6d5f4a63ee3ad0d9f39efc82f2526e45048f3f Mon Sep 17 00:00:00 2001 From: Linwei Shang Date: Thu, 28 May 2026 16:22:53 -0400 Subject: [PATCH 1/5] infra: switch frontend to certified-assets snapshot wasm + sync plugin Pulls canister.wasm and plugin.wasm from the dfinity/certified-assets snapshot-pr63-d5262f2 release with SHA256 integrity checks, and adds public/_headers and public/_redirects to exercise the new asset-canister tooling's headers and redirects support. --- icp.yaml | 31 +++++++++++++++++++++++-------- public/_headers | 34 ++++++++++++++++++++++++++++++++++ public/_redirects | 1 + 3 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 public/_headers create mode 100644 public/_redirects diff --git a/icp.yaml b/icp.yaml index 5c77a204..643c99ce 100644 --- a/icp.yaml +++ b/icp.yaml @@ -1,10 +1,25 @@ +networks: + - name: local + mode: managed + gateway: + port: 0 + canisters: - name: frontend - recipe: - type: "@dfinity/asset-canister@v2.1.0" - configuration: - dir: dist - version: asset-canister-404-support - build: - - npm install - - npm run build + build: + steps: + - type: pre-built + url: https://github.com/dfinity/certified-assets/releases/download/snapshot-pr63-d5262f2/canister.wasm + sha256: aaacb5c927deb57ebd1ec1108b22693b7622b2317ebf6f859f07b7b689aecf5b + + sync: + steps: + - type: script + commands: + - npm install + - npm run build + - type: plugin + url: https://github.com/dfinity/certified-assets/releases/download/snapshot-pr63-d5262f2/plugin.wasm + sha256: 3cdd6d5abf04f3b2bca7c9b4d6370ba9297573259a3239831964a9a667e0481e + dirs: + - dist diff --git a/public/_headers b/public/_headers new file mode 100644 index 00000000..7a7dfc35 --- /dev/null +++ b/public/_headers @@ -0,0 +1,34 @@ +# Cache-Control is intentionally NOT set on `/*` — `_headers` semantics +# concatenate same-name headers across matching rules with `, `, so a global +# default would corrupt the more-specific overrides below (e.g. +# `public, max-age=0, must-revalidate, public, max-age=31536000, immutable`). +# Pages not covered by a specific rule fall back to browser heuristic caching. +# +# Starlight uses inline