Is Cross-Origin access possible? #842
-
I know by design IndexedDB is intended to be used from a same-origin perspective I'm building out a number of single SPA apps that each have their own port number, and I'd like to be able to access the named IndexedDB database and store in a cross-origin scenario I'm wondering if this library already supports that (and if so, how to enable it) - and if not, I know there are other libraries out there that support cross-origin access, so I'm wondering if there could be any consideration to adding this as a feature Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No client side storage will ever allow you to access things from another origin. It would mean that any website/app could access data from any another website/app, which would be madness. What is eventually possible is:
But before considering these options, you should really reconsider. I do not know what is your use case, but it does not seem normal to want to do what you ask. Let us imagine you want to share authentication: what would be shared would be the API entry point, but it would be normal that each app rebuilds its own authentication data. For example, you can connect to Instagram with a Facebook account, but still you have to authenticate twice, on each app. |
Beta Was this translation helpful? Give feedback.
No client side storage will ever allow you to access things from another origin. It would mean that any website/app could access data from any another website/app, which would be madness.
What is eventually possible is:
But before considering these options, you should really reconsider. I do not know what is your use case, but it does not seem normal to want to do what you ask. Let us imagine you want to share authentication: what would be shared would be the API entry point, but it would be normal that each app rebuilds its own authentication data. For example, you can connect to Instagram with a Facebook …