billions-minister-2901
04/16/2025, 4:08 PMbrief-egg-61061
04/16/2025, 4:08 PMbrief-egg-61061
04/16/2025, 4:08 PM<https://auth-branch.pudgyworld.com>
but trying to access <https://auth-ory-branch.pudgyworld.com>
. ## How to fix it There are several ways to resolve this issue: ### 1. Configure CORS in your Ory project You need to add your origin domain to the allowed CORS origins list: ory patch project <your-project-id> \ --replace '/cors_public/enabled=true' \ --replace '/cors_public/origins=["<https://auth-branch.pudgyworld.com>"]'
You can add up to 50 origins to your Ory project. Wildcards are supported, so you could use https://*.<http://pudgyworld.com|pudgyworld.com>
to allow all subdomains. However, Ory recommends using exact matches for better security. [Ory Docs: Set up CORS for Ory Network](https://www.ory.sh/docs/guides/cors) ### 2. Use Ory Proxy for local development For local development, you can use Ory Proxy which acts as a reverse proxy in front of your application: ory proxy --project <project-id> --workspace <workspace-id> <http://localhost:3000>
This allows Ory endpoints to be mirrored on the same domain as your app, avoiding CORS issues. [Ory Docs: Ory Proxy and Ory Tunnel](https://www.ory.sh/docs/guides/cli/proxy-and-tunnel#ory-proxy) ### 3. Add a custom domain For production, consider adding a custom domain to your Ory project so that all requests from your frontend can be made to Ory under the same domain. [Ory Docs: Integration basics](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#debug) ### 4. Check for duplicate CORS settings If you're using a custom domain and also have CORS settings in your Ory Hydra configuration, this can cause issues with duplicate headers: --allowed-cors-origins strings A list of allowed CORS origins. Wildcards are allowed.
Make sure you're not configuring CORS in multiple places, as this can lead to duplicate headers. [Ory CLI: ory proxy options](https://www.ory.sh/docs/cli/ory-proxy#options) If you're still experiencing issues after implementing these solutions, you might need to check your browser's developer tools for more specific error messages or contact Ory support for further assistance.billions-minister-2901
04/16/2025, 4:24 PMbrief-egg-61061
04/16/2025, 4:24 PMbrief-egg-61061
04/16/2025, 4:24 PM