ui: auto detect ingest for spot (if not cloud)
This commit is contained in:
parent
b9cca6b388
commit
5f15dfafe7
2 changed files with 8 additions and 0 deletions
|
|
@ -489,6 +489,11 @@ export default defineBackground(() => {
|
|||
}, PING_INT);
|
||||
}
|
||||
});
|
||||
if (request.ingest) {
|
||||
const updatedSettings = Object.assign(settings, { ingestPoint: request.ingest });
|
||||
settings = updatedSettings;
|
||||
void browser.storage.local.set({ settings: updatedSettings });
|
||||
}
|
||||
}
|
||||
if (request.type === messages.content.from.invalidateToken) {
|
||||
if (refreshInt) {
|
||||
|
|
|
|||
|
|
@ -241,9 +241,12 @@ export default defineContentScript({
|
|||
}
|
||||
if (event.data.type === "orspot:token") {
|
||||
window.postMessage({ type: "orspot:logged" }, "*");
|
||||
const ingest = window.location.origin;
|
||||
const isSaas = ingest === 'https://app.openreplay.com'
|
||||
void browser.runtime.sendMessage({
|
||||
type: messages.content.from.setLoginToken,
|
||||
token: event.data.token,
|
||||
ingest: isSaas ? undefined : ingest
|
||||
});
|
||||
}
|
||||
if (event.data.type === "orspot:invalidate") {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue