CORS のオリジン設定が機能しない

I want to embed the latest updates from our community on my website:

To accomplish this, I am trying to access the latest.json and will parse that appropriately and embed on my site:

I went to admin and setup the CORS origins:

I even updated app.yml with the following lines and rebuild the whole thing:
DISCOURSE_ENABLE_CORS: true
DISCOURSE_CORS_ORIGIN: ‘https://www.schulminator.com/
I don’t know if this is needed but it does work with this setting or without.

But still same issue as you check on this site:

Access to XMLHttpRequest at ‘https://community.schulminator.com/latest.json’ from origin ‘https://www.schulminator.com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

I am really stuck here…

「いいね!」 3

Same problem here
Has someone been able to get it work?

「いいね!」 3

もし誰かがCORS設定で同様の問題に直面しているなら、リンクの末尾のスラッシュを削除したか確認してください。数時間を費やしてしまった愚かなミスでした。:sweat_smile:

「いいね!」 5

CORS 設定のヒントは、もっと明確にするべきだと思います:

現在のテキスト

クロスオリジンリクエスト (CORS) で許可されるオリジン。各オリジンには http:// または https:// を含める必要があります。CORS を有効にするには、DISCOURSE_ENABLE_CORS 環境変数を true に設定する必要があります。

草案の提案

クロスオリジンリクエスト (CORS) で許可されるオリジン。各オリジンには http:// または https:// を含める必要があり、末尾のスラッシュは含めないでください。CORS を有効にするには、DISCOURSE_ENABLE_CORS 環境変数を true に設定する必要があります。

余談ですが、このような変更の PR はどのように作成すればよいでしょうか?英語のロケール こちら のみを変更すれば、翻訳は別で管理される(例えば Transifex を通じて)のでしょうか、それとも PR に翻訳も含まれるべきでしょうか?

「いいね!」 2

末尾のスラッシュが問題の場合は、コードが自動的に削除します @sam

「いいね!」 6

@vinothkannans trailing slash を自動的に削除するように変更してくれませんか?

「いいね!」 3

以下の PR で修正されました

「いいね!」 4