Skip to content

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

Merged
mshabarov merged 1 commit into
mainfrom
fix/exclude-generated-pwa-icons-from-manifest
Dec 9, 2024
Merged

mshabarov merged 1 commit into
mainfrom
fix/exclude-generated-pwa-icons-from-manifest

Conversation

@mcollovati

Copy link
Copy Markdown
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
@github-actions

github-actions Bot commented Dec 9, 2024

Copy link
Copy Markdown
Contributor

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.

@sonarqubecloud

sonarqubecloud Bot commented Dec 9, 2024

Copy link
Copy Markdown

@mshabarov
mshabarov merged commit 28f60d3 into main Dec 9, 2024
@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 <marco@vaadin.com>
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