Skip to content

Commit

Permalink
Disable ServiceWorker in Admin (#1)
Browse files Browse the repository at this point in the history
* Add module dependency

* Add known tab issue to readme

* Update README.md

Co-authored-by: James Calcaben <jcalcaben@users.noreply.github.com>

Co-authored-by: James Calcaben <jcalcaben@users.noreply.github.com>
  • Loading branch information
tjwiebell and jcalcaben authored Nov 4, 2020
1 parent 412b246 commit b4ff16f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,11 @@ privacy-policy-cookie-restriction-mode

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.

## Service Worker Note

Avoid sharing the same hostname between your PWA Studio storefront and the Magento 2 admin backend.
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.
If you cannot avoid sharing the hostname, access one service at a time or use a private browsing session per service.

[upward-php]: https://github.com/magento/upward-php
[magento cloud deployment]: http://pwastudio.io/tutorials/cloud-deploy/
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"require": {
"php": "~7.3.0||~7.4.0",
"magento/framework": "*",
"magento/upward": "*"
"magento/upward": "*",
"yireo/magento2-disable-service-worker-in-admin": "^0.0.2"
},
"type": "magento2-module",
"license": [
Expand Down

0 comments on commit b4ff16f

Please sign in to comment.