Skip to content

Instantly share code, notes, and snippets.


Clifford Oravec cliffordoravec

View GitHub Profile
cliffordoravec / satellizer-storage-decorator.js
Last active Sep 17, 2018
Using Satellizer with and across subdomains using cookies
View satellizer-storage-decorator.js
Satellizer's storage service can use 'localStorage' and 'sessionStorage' by default.
None of these options work well if you need to use Satellizer with or across subdomains.
(Given, there is the fun iframe and postMessage workaround, but that's really inconvenient.)
Here's a simple approach using cookies for storage, which can be used across subdomains
(since cookies can be used across subdomains, right?).
By default, $http is configured with withCredentials set to false, so the cookies themselves