I believe you have to set DISCOURSE_ENABLE_CORS: true in your app.yml (somewhere in the env section)
DISCOURSE_ENABLE_CORS: true
env