Multiple PWAs on the same host but different ports - same origin behavior

Viewed 84

We´re transforming a SAP Fiori launchpad into a PWA by loading a manifest and a service worker from a custom endpoint. The actual server (SAP Gateway) is composed of multiple clients (~tenants) and we use a web dispatcher (reverse proxy) that allows users to access client specific launchpads by mapping HTTPS ports to gateway clients. Applications vary between clients.

Goal: Provide separate PWA installations for each gateway client.

Issue: Chrome on Android ignores the port when checking whether a PWA for the current page is already installed (same origin-domain).

Example:

Instance Client Host Page URL
DEV 100 dev.company.com:11443 /sap/bc/.../FioriLaunchpad.html
DEV 200 dev.company.com:21443 /sap/bc/.../FioriLaunchpad.html

Lets say we install the launchpad PWA for dev.company.com:11443 (client 100) and then access the dev.company.com:21443 (client 200) launchpad using Chrome on Android. Chrome considers that page to be installed as there is a PWA registered for dev.company.com:/sap/bc/.../FioriLaunchpad.html although the port and therefore the origin of the client 200 page differs. Thus, there is no way to install a separate PWA for client 200.

From my understanding PWAs should be (somehow) origin dependent. What am I missing? Is there any way to enforce some kind of same-origin behavior? This works fine using Chrome on Windows btw.

0 Answers
Related