Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the frame URL #70

Closed
juanpmarin opened this issue May 31, 2018 · 7 comments
Closed

Change the frame URL #70

juanpmarin opened this issue May 31, 2018 · 7 comments

Comments

@juanpmarin
Copy link

juanpmarin commented May 31, 2018

Hi
Is it possible to change the frame url ? and if it is, how is the handling of the onload

@yowainwright
Copy link
Contributor

@juanpmarin What's the use case that you're thinking about?

—Thanks

@juanpmarin
Copy link
Author

@yowainwright How is going ?
I want to dynamically change the frame URL beign able to don't loose the communication

@yowainwright
Copy link
Contributor

@juanpmarin hey! Thanks for your response. Your insights are appreciated.

Here's my initial response:

Dynamically changing the child (<iframe>'s src) is not supported by Postmate. Postmate uses postmessage and soon messageChannels. Both APIs expect a secure handshake between a parent (a webpage) and a child (an <iframe>).

What are your thoughts? Would query params work? Have you tried?

@juanpmarin
Copy link
Author

Query params would not work because we have different apps on different hosts and we want to change dynamically between pages

@yowainwright
Copy link
Contributor

@juanpmarin thanks for that insight.

A good use-case of Postmate is securely sharing information between a webpage and an iframe—like a form with personal information.

To me, this means that allowing information to be shared between a parent webpage and an iframe. Different/changing sources is a not a best practice for that. That issue can be bypassed and security can be maintained is by setting up a secure host for iframe src's and then whitelisting that host to allow for cross origin sharing. ...That's my abstract consideration.

@juanpmarin
Copy link
Author

@yowainwright sorry, I don't got what you suggestion means, you say that we should have an unique host that routes to the others apps ?

@yowainwright
Copy link
Contributor

yowainwright commented Jun 21, 2018

Sorry, I was describing my companies own use case.

To accomplish that your initial goal (as I understand it), the ur could be changed with JS or a new Postmate instance can be created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants