Commit 23daf95
infra: switch frontend to certified-assets snapshot wasm + sync plugin (#280)
## Summary
- Pulls `canister.wasm` and `plugin.wasm` from the
[dfinity/certified-assets `snapshot-pr69-7571cba`
release](https://github.com/dfinity/certified-assets/releases/tag/snapshot-pr69-7571cba)
via `url:` + `sha256:` so `icp` verifies integrity before use.
- Adds `public/_headers` and `public/_redirects` to exercise the new
asset-canister tooling's headers and redirects support.
- Drops `assets.toml` and the `files:` entry in `icp.yaml`. With
[certified-assets PR
#66](dfinity/certified-assets#66),
`Content-Type` is read directly from `_headers`, so the separate TOML
file is no longer needed. The single non-default override (`.did` →
`text/plain; charset=utf-8`) now lives in `public/_headers`.
- Drops `public/.ic-assets.json5` — the legacy `headers.Content-Type`
workaround (which produced duplicate `Content-Type` headers in the
certified response) is fully superseded.
- Bumps `icp-cli` to v0.2.7.
## Notes
- To demo cross-domain redirects: add a line like `/xxx
https://google.com 301` in `public/_redirects` and deploy — visiting
`/xxx` should bounce to `https://google.com`.
## Test plan
- [x] `icp deploy` downloads both wasms, verifies SHA256, and deploys
- [x] Headers in `public/_headers` are served on matching paths (CSP,
cache rules)
- [x] Same-origin redirects in `public/_redirects` resolve (e.g. `/*
/404.html 404`)
- [x] Cross-domain redirect works after adding `/xxx https://google.com
301`
- [x] `curl -I` on `*.md` returns `Content-Type: text/markdown;
charset=utf-8` (exactly one header)
- [x] `curl -I` on `*.did`, `*.sh`, and `llms.txt` returns
`Content-Type: text/plain; charset=utf-8` (exactly one header)
---------
Co-authored-by: Raymond Khalife <raymond.khalife@dfinity.org>1 parent 4d1be64 commit 23daf95
6 files changed
Lines changed: 674 additions & 75 deletions
File tree
- .github/workflows
- public
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
1 | 7 | | |
2 | 8 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
0 commit comments