-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Create config-local.js including iframe "keep alive" code #1927
Conversation
@alilahrime add this to your code in the main app: const EVENT_TYPE = "message"; // from event types https://developer.mozilla.org/en-US/docs/Web/API/EventSource/message_event
window.addEventListener(EVENT_TYPE, function(event) {
console.log("got message (event.origin): " + event.origin); // you can use this to check if message is coming from atlas...
console.log("got message (event.data): " + event.data);
// CALL gen3 function to refresh session:
// ??
}); @m0nhawk is there a gen3 function we can call to refresh a session ^^ ? |
The data-portal is doing the following here:
I would expect it can be done similarly, but better to check with other frontend developers on this. |
@m0nhawk thanks for sharing this code. Do you think this can be done cross-domain as well? Not sure if our Atlas installation will be on a different domain? |
Yes, it's expected for Atlas and WebAPI to be on a different domain. And... I'm not really sure how to do that cross-domain, I haven't tried that before. |
@m0nhawk thanks for the info. For cross-domain scenario I think it has to be implemented like we are proposing in this PR (with |
5436af9
to
921d1dd
Compare
c909b8f
to
71adf00
Compare
Are we merging this one? The code seems to be on QA already |
71adf00
to
5ef8ffb
Compare
move file contents out of README file clean code
5ef8ffb
to
a4af2e4
Compare
Jira Ticket: PXP-9641
New Features