javascript - Using Service Worker API in a multi site environment -


so new stuff notifications , offline caching available service worker api i've been looking add web app.

the thing can't seem figure out how deal the https/ssl issue.

my site allows people host websites in online no code environment. new sites accessed subdomains off main domain. can see requiring wildcard subdomain ssl cert.

the complication i'm facing premium sites can add own top level domain. break service worker far can tell.

all these sites require user sign once users shared between sites , can notifications , messages cross site.

i take advantage of notifications part of api mobile i'm going need around issue first.

any or enlightenment on appreciated :).

as alex russel pointed in article:

service worker scripts must hosted @ same origin

and service worker can't work outside scope. subdomains are not same origin, you'll need specific worker specific client's page.

however, can't see problem here - when enter yourpremiumclient.com, dns server (ex. cloudflare, offers free https , can force https) point server, worker install , control domain scope. of course, same worker won't able control default scope ex. yourclient.yourdomain.com.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -