Skip to content

Commit b4ff16f

Browse files
tjwiebelljcalcaben
andauthored
Disable ServiceWorker in Admin (#1)
* Add module dependency * Add known tab issue to readme * Update README.md Co-authored-by: James Calcaben <[email protected]> Co-authored-by: James Calcaben <[email protected]>
1 parent 412b246 commit b4ff16f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,11 @@ privacy-policy-cookie-restriction-mode
3636

3737
With this example, when a visitor navigates to either `<Magento store URL>/contact` or `<Magento store URL>/privacy-policy-cookie-restriction-mode`, they will land on a page rendered by Magento instead of the storefront application.
3838

39+
## Service Worker Note
40+
41+
Avoid sharing the same hostname between your PWA Studio storefront and the Magento 2 admin backend.
42+
This causes the storefront Service Worker to intercept backend requests when you have both the storefront and admin tabs open at the same time on your browser.
43+
If you cannot avoid sharing the hostname, access one service at a time or use a private browsing session per service.
44+
3945
[upward-php]: https://github.com/magento/upward-php
4046
[magento cloud deployment]: http://pwastudio.io/tutorials/cloud-deploy/

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"require": {
88
"php": "~7.3.0||~7.4.0",
99
"magento/framework": "*",
10-
"magento/upward": "*"
10+
"magento/upward": "*",
11+
"yireo/magento2-disable-service-worker-in-admin": "^0.0.2"
1112
},
1213
"type": "magento2-module",
1314
"license": [

0 commit comments

Comments
 (0)