<@U04UQ68083H> I am receiving a CORS error when ru...
# ory-copilot
b
@chilly-king-10285 I am receiving a CORS error when running
Copy code
ory tunnel <https://local.goriv.co:3100> --allowed-cors-origins <https://local.goriv.co:3100>
b
A message from kapa.ai
Based on the information provided in the knowledge sources, it appears that you're encountering a CORS (Cross-Origin Resource Sharing) error when using the Ory Tunnel command. To address this issue, I can provide some guidance: 1. First, ensure that you're using the correct syntax for the
ory tunnel
command. The
--allowed-cors-origins
flag should be used to specify allowed CORS origins. However, your command seems to have an issue with the URL formatting. Try removing the angle brackets around the URLs:
Copy code
ory tunnel <https://local.goriv.co:3100> --allowed-cors-origins <https://local.goriv.co:3100>
2. If the issue persists, you might need to add additional CORS headers. According to the [Ory Tunnel documentation](https://www.ory.sh/docs/cli/ory-tunnel#options), you can use the
--additional-cors-headers
flag to allow specific headers:
Copy code
ory tunnel <https://local.goriv.co:3100> --allowed-cors-origins <https://local.goriv.co:3100> --additional-cors-headers "Authorization,Content-Type"
3. It's also worth noting that Ory Tunnel is designed for development purposes only and should not be used in production environments. For production setups, consider using [custom domains](https://www.ory.sh/docs/guides/custom-domains) instead. 4. If you're still experiencing CORS issues, you might want to check your Ory Network project settings to ensure that CORS is properly configured there as well. You can find more information about setting up CORS for Ory Network in the [CORS documentation](https://www.ory.sh/docs/guides/cors). If these steps don't resolve your issue, you may need to provide more details about your specific setup and the exact error message you're receiving for further assistance.