I'm embedding a Streamlit app hosted on Heroku in an iframe in my Next.js app. The Streamlit app has a CSV upload feature, which works fine when accessed directly but throws a
AxiosError: Request failed with status code 403
when used through the iframe (in another domain).
This seems to be a CORS issue. I'm looking for guidance on how to configure CORS on Heroku to allow requests from my Next.js app's domain.
I checked these topics without luck:
- File Uploader 403 Error When Embedding Streamlit App in Iframe
- Embedded Streamlit App as Iframe: XMLHttpRequest and CORS Errors
- Issue with Receiving postMessage Events in a Streamlit App Embedded in a Next.js Iframe
Has anyone tackled this or have any advice?