-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discourse API: Allow CORS access #144
Comments
I like to extend this request to include |
Ehm guys, WDYT? |
For Discourse, you can PM your case to I'm not in favor of it, it's strongly discouraged (https://meta.discourse.org/t/what-are-the-risks-of-enabling-cross-origin-resource-sharing-discourse-enable-cors/41248). As an alternative, you can take a look at the HABPanel widget gallery implementation https://github.com/openhab/org.openhab.ui.habpanel/tree/master/src/main/java/org/openhab/ui/habpanel/internal/gallery/community for an example of how to retrieve public data from Discourse with a server-side proxy. As for this website, it's a lesser risk, but it's just static HTML and JS, cross-domain requests are usually for APIs and this site doesn't have one... can you explain your use case? |
Of course. My Paper UI design study.
|
It's not about web traffic, it's about preserving the forum users' security and preventing random malicious sites from performing damaging requests on their behalf, or for spamming etc. CORS is vitally important for this.
You mean you want to extract the content from the pages, remove the headers and so on? That's kind of dirty :) |
I'm already doing it xD. And yeah I know, I could use the github content directly (and I'm doing that in other occasions), but the website script has already crawled everything together for me in this case. Would be even more awesome if the website crawler script could generate |
Oh I thought it is about traffic only. I only need to issue GET requests. We could enable CORS for GET only for non-openhab domains. |
Still an issue, you can access sensible information (e.g. private messages) with GET requests. |
But as you stated, authentication headers (actually no headers at all) and also cookies are not allowed with CORS in the default settings. |
What is the situation now?
|
Friendly reminder ^^ |
Again, this is the website's repo, it has nothing to do with Discourse. |
But yannick, that is all I wanted to know. You are not wanting to give access to the HTML pages, but you would accept to access a generated JSON file. Thanks :) |
That's because your original request was mainly about Discourse ;) and I didn't know if those able to grant or deny you that request were listening here or not. I personally don't have access to the Discourse server's configuration (only the in-app admin area). |
At the moment the community forum API cannot be accessed form a client (browser) app directly.
Would it be viable to add the required CORS headers for access? A rate limit can of course be applied.
The text was updated successfully, but these errors were encountered: