Hi everyone
I’m currently facing a challenge with my Streamlit app, which is hosted on Heroku. I’m trying to embed this app in an iframe within my Next.js application, hosted on a different domain. When I attempt to upload a CSV file through the Streamlit app in the iframe, I encounter a “AxiosError: Request failed with status code 403” error. However, uploading works fine when accessing the Streamlit app directly on its domain.
It seems to be a CORS issue, but I’m unsure how to properly configure CORS settings for a Streamlit app on Heroku to allow requests from my Next.js app’s domain.
Has anyone faced a similar issue or has any suggestions on how to configure CORS for this setup? I’m looking for the most straightforward approach that would allow my Streamlit app to accept file uploads when embedded in an iframe on another domain.
I checked these topics without luck: