feat(web): improve web build configuration and accessibility
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 14m6s
Test Suite / flutter-quality (push) Failing after 4m44s

- Add source maps and web renderer build arguments with defaults
- Configure Caddy with CSP headers, cache policies, and service worker handling
- Defer loading of import screen for performance optimization
- Add semantic labels to icons for accessibility
- Update web index.html with Swedish language, meta tags, and description
- Add robots.txt and lighthouse configuration
- Add new planning documents and archive entries
This commit is contained in:
Nils-Johan Gynther
2026-05-23 18:04:27 +02:00
parent 30d27d6b8a
commit 69bcc3e342
16 changed files with 1847 additions and 301 deletions
+27 -7
View File
@@ -1,10 +1,30 @@
:{$PORT:5000} {
root * /usr/share/caddy
# Proxy API calls to backend service on the internal Docker network.
handle /api/* {
reverse_proxy recipe-api:8080
}
:{$PORT:5000} {
root * /usr/share/caddy
header {
Content-Security-Policy "default-src 'self'; base-uri 'self'; object-src 'none'; frame-ancestors 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self' data:; connect-src 'self' https: http: ws: wss:; worker-src 'self' blob:"
}
@staticAssets {
path *.js *.wasm *.woff *.woff2 *.ttf *.otf
}
header @staticAssets Cache-Control "public, max-age=86400"
@hashedAssets {
path_regexp hashedAssets .*[._-][0-9a-fA-F]{8,}\.(js|css|wasm|woff2?|ttf|otf)$
}
header @hashedAssets Cache-Control "public, max-age=31536000, immutable"
@serviceWorker path /flutter_service_worker.js /version.json
header @serviceWorker Cache-Control "no-cache, must-revalidate"
@index path / /index.html
header @index Cache-Control "public, max-age=300, must-revalidate"
# Proxy API calls to backend service on the internal Docker network.
handle /api/* {
reverse_proxy recipe-api:8080
}
# SPA-routing returnera alltid index.html för okända paths
handle {