Repository navigation
Commit 7810e5a
fix(server): harden the GitHub media proxy and fall back to the direct URL
Review follow-ups on the private repository media fix: the cache key held a
literal NUL byte, which made the new module a binary blob to git; a name no
`decodeURIComponent` accepts killed asset issuance; and the proxied bytes
carried GitHub's content type without the `nosniff` and SVG policy every other
asset gets. The proxy now serves only pictures and recordings, naming them from
the file when the raw host says `application/octet-stream`, forwards an upstream
refusal instead of turning it into 502, and follows GitHub's redirect itself so
the credential provably stops at GitHub.
A signed URL that cannot be minted — an older server, or one with no route to
GitHub — now falls back to the direct link instead of a dead placeholder, so
public media keeps working exactly as it did. Authored attributes, the original
link, and the legacy attachment and Git LFS hosts are handled too.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>1 parent dfd5009 commit 7810e5a
5 files changed
Lines changed: 78 additions & 14 deletions
File tree
- apps
- server/src/assets
- web/src/components
- pullRequest
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1089 | 1089 | | |
1090 | 1090 | | |
1091 | 1091 | | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
1092 | 1105 | | |
1093 | 1106 | | |
1094 | 1107 | | |
1095 | 1108 | | |
| 1109 | + | |
1096 | 1110 | | |
1097 | 1111 | | |
1098 | 1112 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1588 | 1588 | | |
1589 | 1589 | | |
1590 | 1590 | | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
1591 | 1601 | | |
1592 | 1602 | | |
1593 | 1603 | | |
| |||
1600 | 1610 | | |
1601 | 1611 | | |
1602 | 1612 | | |
1603 | | - | |
1604 | | - | |
1605 | | - | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
1606 | 1622 | | |
1607 | 1623 | | |
1608 | 1624 | | |
| |||
1638 | 1654 | | |
1639 | 1655 | | |
1640 | 1656 | | |
1641 | | - | |
| 1657 | + | |
1642 | 1658 | | |
1643 | 1659 | | |
| 1660 | + | |
1644 | 1661 | | |
1645 | 1662 | | |
1646 | 1663 | | |
| |||
1653 | 1670 | | |
1654 | 1671 | | |
1655 | 1672 | | |
1656 | | - | |
| 1673 | + | |
1657 | 1674 | | |
1658 | 1675 | | |
1659 | 1676 | | |
1660 | | - | |
| 1677 | + | |
1661 | 1678 | | |
| 1679 | + | |
1662 | 1680 | | |
| 1681 | + | |
1663 | 1682 | | |
1664 | 1683 | | |
1665 | 1684 | | |
| |||
3137 | 3156 | | |
3138 | 3157 | | |
3139 | 3158 | | |
| 3159 | + | |
3140 | 3160 | | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
3141 | 3166 | | |
3142 | 3167 | | |
3143 | 3168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | | - | |
40 | | - | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
18 | 27 | | |
19 | 28 | | |
20 | 29 | | |
| |||
29 | 38 | | |
30 | 39 | | |
31 | 40 | | |
32 | | - | |
| 41 | + | |
33 | 42 | | |
34 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
35 | 49 | | |
36 | 50 | | |
37 | 51 | | |
38 | 52 | | |
39 | 53 | | |
40 | 54 | | |
41 | 55 | | |
42 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
43 | 60 | | |
44 | 61 | | |
45 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
46 | 69 | | |
47 | 70 | | |
0 commit comments