careful-flower-71235
09/26/2023, 2:39 AMlocalhost
to allowed domains for CORS, so I exposed my react app through ngrok to test.
I've added the ngrok domain to my CORS on the UI as shown below, but I still get a CORS error. Has anyone faced this issue before?magnificent-energy-493
It allows to do something similar to ngrok by exposing local app/services to the web but it's free to use custom domain.
Here how it works:
I created a free ory project to test this, and I tried the following configuration:
1) Cloudflare tunnels
<https://custom1.domain.com> => <http://localhost:3000> (our app)
<https://custom2.domain.com> => <http://localhost:4000> (ory tunnel)
2) Ory tunnel
SDK URL in our app
ORY_URL=<https://custom2.domain.com>
ORY_PROXY_URL=<http://custom2.domain.com|custom2.domain.com>
ORY_SCHEME=https
Ory tunnel
ory tunnel <https://custom1.domain.com> <https://custom2.domain.com> --allowed-cors-origins <https://custom1.domain.com> --project xxxxxxxxxxxxxxxxxxxx --debug --cookie-domain <http://domain.com|domain.com> --dev
Let me know if that is something that could work for you @careful-flower-71235careful-flower-71235
09/26/2023, 8:46 AMory patch project f5c3c1de-bffe-4bc4-9e8d-2edfd776330d \
--replace '/cors_public/enabled=true' \
--replace '/cors_public/origins=["https://*.<http://ngrok-free.app|ngrok-free.app>"]'
After running this command, it started working. But I can't find these configs on the ory console, is it not available via the UI yet?magnificent-energy-493
careful-flower-71235
09/26/2023, 9:11 AM