Hello,
According to the new changes in the Streamlit URL formatting, any public Streamlit link can still be used in iframe by adding embedded=true
as a parameter to the embedded URL. This works when there is only one parameter embedded=true
is being added to the URL. However, with adding additional parameters to the URL like ?someparam=value&embedded=true
will eventually lead to “… redirected you too many times” error.
Here is my example HTML page with iframe:
<html>
<head></head>
<body>
<iframe src="https://streamlit-example-app-ab-testing-streamlit-app-rmlvff.streamlitapp.com/?someparam=value&embedded=true" style="height: 100%; width:100%;">
</iframe>
</body>
</html>
Steps to produce the error:
- Leave the page open and visible for at least 5 minutes or more. (in the Network tab you can notice calls to
... api/v1/app/status
every 2 seconds) - Upon
/api/v1/app/status
or/api/v1/app/context
returning any failure response, notice the page gets refreshed by redirecting the call through:https://share.streamlit.io/-/auth/app?redirect_uri=https%3A%2F%2Fstreamlit-example-app-ab-testing-streamlit-app-rmlvff.streamlitapp.com%2F%3Fsomeparam%3Dvalue&embedded=true
- Next cals the
https://streamlit-example-app-ab-testing-streamlit-app-rmlvff.streamlitapp.com/-/login?payload=…
- Finally, returns back to the Streamlit app link:
https://streamlit-example-app-ab-testing-streamlit-app-rmlvff.streamlitapp.com/?someparam=value
but with missingembedded=true
. - steps 2 to 4 keeps repeating in a loop.
Screenshot of the network tab:
It seems, only one parameter can be added to the Streamlit URL embedded in iframe.
Thank you!