fix: proxy weather icons through server to fix PWA standalone on Android
External image requests to openweathermap.org fail silently in Chrome Android PWA standalone mode. Icons are now proxied via GET /api/v1/weather/icon/:code, making them same-origin — cacheable by the service worker and free of CORS/CSP issues. Tightened CSP: removed openweathermap.org from imgSrc (no longer needed). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ app.use(helmet({
|
||||
'https://cdn.jsdelivr.net',
|
||||
],
|
||||
styleSrc: ["'self'", "'unsafe-inline'"],
|
||||
imgSrc: ["'self'", 'data:', 'https://openweathermap.org'],
|
||||
imgSrc: ["'self'", 'data:'],
|
||||
connectSrc: ["'self'"],
|
||||
fontSrc: ["'self'"],
|
||||
objectSrc: ["'none'"],
|
||||
|
||||
Reference in New Issue
Block a user