Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent generated pwa icons to be added to manifest #20639

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

mcollovati
Copy link
Collaborator

Generated PWA icons are served at runtime by PwaHandler, that also takes care of adding a subset of them to the web manifest for caching. However, the Vite inject-manifest-to-sw plugin adds all generated icons to the manifest with /pwa-icons path prefix making them pre-cached by the browser and potentially breaking pre-defined security rules.
This change prevents generated icons to be added to the manifest, preserving the previous behavior.

Generated PWA icons are served at runtime by PwaHandler, that also takes care
of adding a subset of them to the web manifest for caching.
However, the Vite inject-manifest-to-sw plugin adds all generated icons to the
manifest with /pwa-icons path prefix making them pre-cached by the browser and
potentially breaking pre-defined security rules.
This change prevents generated icons to be added to the manifest, preserving
the previous behavior.
@mcollovati mcollovati force-pushed the fix/exclude-generated-pwa-icons-from-manifest branch from ec420ba to bb15cd6 Compare December 9, 2024 06:51
Copy link

github-actions bot commented Dec 9, 2024

Test Results

1 158 files  ± 0  1 158 suites  ±0   1h 32m 57s ⏱️ + 4m 28s
7 519 tests ± 0  7 466 ✅ ± 0  53 💤 ±0  0 ❌ ±0 
7 885 runs  +13  7 823 ✅ +13  62 💤 ±0  0 ❌ ±0 

Results for commit bb15cd6. ± Comparison against base commit e988d48.

Copy link

sonarcloud bot commented Dec 9, 2024

@mshabarov mshabarov merged commit 28f60d3 into main Dec 9, 2024
26 checks passed
@mshabarov mshabarov deleted the fix/exclude-generated-pwa-icons-from-manifest branch December 9, 2024 12:35
vaadin-bot pushed a commit that referenced this pull request Dec 9, 2024
Generated PWA icons are served at runtime by PwaHandler, that also takes care
of adding a subset of them to the web manifest for caching.
However, the Vite inject-manifest-to-sw plugin adds all generated icons to the
manifest with /pwa-icons path prefix making them pre-cached by the browser and
potentially breaking pre-defined security rules.
This change prevents generated icons to be added to the manifest, preserving
the previous behavior.
vaadin-bot added a commit that referenced this pull request Dec 9, 2024
…0650)

Generated PWA icons are served at runtime by PwaHandler, that also takes care
of adding a subset of them to the web manifest for caching.
However, the Vite inject-manifest-to-sw plugin adds all generated icons to the
manifest with /pwa-icons path prefix making them pre-cached by the browser and
potentially breaking pre-defined security rules.
This change prevents generated icons to be added to the manifest, preserving
the previous behavior.

Co-authored-by: Marco Collovati <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants