Set DISCOURSE_ENABLE_CORS for hosted forum


(Jan Curn) #1

Hi there, we’re a hosted Discourse forum running at forum.apifier.com. We’d like to access the forum using the API. I’ve added our website to Settings -> Security -> cors origins, but still the access doesn’t work. Please can you advice how to set the DISCOURSE_ENABLE_CORS env var to true for hosted forum?


(Jeff Atwood) #2

Search your site settings for “CORS”


(Jan Curn) #3

I tried that but the only setting I see is the “cors origins”, where they say “The DISCOURSE_ENABLE_CORS env variable must be set to true to enable CORS.”. I don’t know where to set this…


(Jeff Atwood) #4

You don’t need to do that in a hosted environment.


(Jan Curn) #5

Oh great, it seems to be working now, many thanks for your help!