CORS in Ghost env?
-
I'd like to use this Translation widget. https://github.com/OmDongaonkar03/Translation-Widget
As we can't run PHP in our Ghost container It's set up here: https://transitionnetwork.org/remote-widgets/translate.php
However when the widget is loaded on my Cloudron hosted Ghost: https://news.transitionnetwork.org/ (blue widget behind the temporary Gtranslate one)
It doesn't work. We suspect a CORS issue, I see that in other apps you can add CORS to the ENV variable. Is that something that would work for Ghost?
If it would what would be the correct syntax please?
-
So looking at the webinspector while trying to use the translation widget, it reveals that the CORS preflight check (OPTIONS https://transitionnetwork.org/remote-widgets/translate.php) does not succeed. This means you have to allow CORS (and thus responding to the OPTIONS call) in your php application.
-
N nebulon marked this topic as a question
-
N nebulon has marked this topic as solved