I am in charge of a large Rails application and would like to use Phoenix for some of the new features.
This means that we often have to embed pages generated by Phoenix in the pages generated by Rails.
I am wondering what a good approach to do this is. There are several options:
- Use an iframe with the content from the Phoenix app.
- Use Nginx and SSI to “merge” the html from the Phoenix app and the Rails app
- Some solution I haven’t thought of
The iframe solution is a bit cumbersome when we for example want the iframe to trigger actions in the surrounding page (like showing a modal popup for example).
The SSI solution is nice from a integration standpoint, but I am a bit worried about the security (see https://medium.com/@shatabda/security-ssi-injection-what-how-fbce1dc232b9 for an example).
Does anyone have any advice with respect to 1 or 2 or maybe have another solution?