Skip to content

fix(pwa): skip private network hosts in SW to restore Chrome PNA prompt#6

Merged
Yuerchu merged 2 commits into
mainfrom
fix/code-review-fixes
Jun 15, 2026
Merged

fix(pwa): skip private network hosts in SW to restore Chrome PNA prompt#6
Yuerchu merged 2 commits into
mainfrom
fix/code-review-fixes

Conversation

@Yuerchu

@Yuerchu Yuerchu commented Jun 15, 2026

Copy link
Copy Markdown
Owner

The generateSW-mode Service Worker was intercepting fetch requests to private/local IPs (e.g. 192.168.x.x), which prevented Chrome from showing its Private Network Access permission dialog. Switch to injectManifest with a custom SW that imports isPrivateOrLocalHost (ipaddr.js) to let those requests fall through to the page context.

Yuerchu and others added 2 commits June 15, 2026 18:24
The generateSW-mode Service Worker was intercepting fetch requests to
private/local IPs (e.g. 192.168.x.x), which prevented Chrome from
showing its Private Network Access permission dialog. Switch to
injectManifest with a custom SW that imports isPrivateOrLocalHost
(ipaddr.js) to let those requests fall through to the page context.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Yuerchu Yuerchu merged commit 65dd308 into main Jun 15, 2026
3 checks passed
@Yuerchu Yuerchu deleted the fix/code-review-fixes branch June 15, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant