Hi 8th Wall Technical Team,
I am encountering a persistent CORS error when connecting my 8th Wall project (running in Simulator, not yet published) to a Flask backend via an HTTPS ngrok tunnel.
Setup
- Frontend: 8th Wall project in Simulator (
*.dev.8thwall.app
) - Backend: Flask, using Flask-CORS (
CORS(app, resources={r"/*": {"origins": "*"}})
), hosted via HTTPS ngrok (e.g.,https://niko.ngrok.app
) - Test: All POST/OPTIONS requests to
/api/generate_story
fail with CORS error
What Happens
- When I click βGenerate Storyβ in the Simulator, fetch requests to my ngrok Flask backend fail with CORS policy error.
- Console error:
Access to fetch at βhttps://niko.ngrok.app/api/generate_storyβ from origin βhttps://kennychowteam-default-kennychow.dev.8thwall.appβ has been blocked by CORS policy: Response to preflight request doesnβt pass access control check: It does not have HTTP ok status.
Failed to load resource: net::ERR_FAILED - I am not even able to test my integration in Simulator.
What Iβve Tried
- Confirmed Flask-CORS is set to
origins='*'
for all endpoints. - OPTIONS and POST work in Postman/curl, CORS headers are correct.
- ngrok tunnel is HTTPS, accessible from anywhere.
- All allowed headers and methods included in Flask-CORS setup.
My Questions
- Are there special CORS or header requirements for ngrok backends to work with 8th Wall Simulator?
- Is there any 8th Wall Simulator CSP restriction I should be aware of?
- Any suggestions to debug Flask + ngrok + 8th Wall Simulator CORS issues?
Screenshots
Thank you for your help!