Maybe I need to set up this ENV?
if env['REQUEST_METHOD'] == ('OPTIONS') && env['HTTP_ACCESS_CONTROL_REQUEST_METHOD']
return [200, Discourse::Cors.apply_headers(cors_origins, env, {}), []]
end
Do I need to set some ENV vars? If so, where? Maybe this is my failure?
Thanks!
FWIW, set this in the plugin initializer:
Discourse.SiteSettings.discourse_enable_cors = true;
Discourse.SiteSettings.discourse_cors_origin = "*";
and console.log
shows these setting are OK… but the dreaded access denied remain in the console as well