perf: CoinGecko proxy, font-display optional, contrast fix

- Route CoinGecko API through /api/rates.php to avoid CORS blocks
- font-display: optional eliminates font-swap layout shifts (CLS ~0)
- Disabled button contrast: #bbb on #5a3520 (5.8:1 ratio)
- Nginx font caching: 1 year, immutable
This commit is contained in:
Alexander Schmidt
2026-03-25 17:00:20 +01:00
parent 6a9a5b6a75
commit 8d3e37239f
5 changed files with 30 additions and 8 deletions

4
sw.js
View File

@@ -35,8 +35,8 @@ self.addEventListener('activate', function (e) {
self.addEventListener('fetch', function (e) {
var url = new URL(e.request.url);
// External APIs and RPC proxy — network only, don't cache
if (url.hostname !== location.hostname || url.pathname.startsWith('/api/')) {
// API calls — network only, don't cache
if (url.pathname.startsWith('/api/')) {
e.respondWith(fetch(e.request));
return;
}