<@U04UQ68083H> when i use ory tunnel. can i disabl...
# ory-copilot
f
@chilly-king-10285 when i use ory tunnel. can i disable my custom ui?
b
A message from kapa.ai
When using Ory Tunnel for local development, you can't directly disable your custom UI through the tunnel itself. However, you can control which UI is used in your Ory Network project. If you've set up a custom UI and want to switch back to using the Ory Account Experience (the default UI), you would need to: 1. Go to BrandingUI URLs in the [Ory Console](https://console.ory.sh/projects/current/ui) 2. Remove the custom UI base URL if you've set one 3. Reset the UI paths to their default values (which use the
/ui/{flow_name}
format) The Ory Tunnel itself is primarily a development tool that "mirrors Ory APIs on your local machine, allowing seamless development and testing" [Ory Tunnel](https://www.ory.sh/docs/cli/ory-tunnel#ory-tunnel). It doesn't have specific functionality to enable or disable UIs. If you're specifically looking to disable the Account Experience welcome page, there is a toggle in the Ory Console to "Enable the Account Experience welcome page" which you can turn off [Configure Ory to use your UI](https://www.ory.sh/docs/kratos/bring-your-own-ui/configure-ory-to-use-your-ui). For complete disabling of the Account Experience UI when you have a custom UI, this has been a requested feature as seen in GitHub issues, and Ory has been working on implementing this functionality.
f
@chilly-king-10285 in the code of the ory cli there is set a header Ory-No-Custom-Domain-Redirect
b
A message from kapa.ai
Yes, the
Ory-No-Custom-Domain-Redirect
header is used in the Ory CLI to control redirection behavior when working with custom domains. This header is particularly relevant when you're using tools like Ory Proxy or Ory Tunnel during development. Based on the knowledge sources, this header appears to be related to how Ory handles requests when you have custom domains configured. When this header is set, it instructs the Ory backend not to redirect requests to your custom domain, which can be useful during local development or when you need to interact directly with the Ory project endpoints. This is particularly important in scenarios where: 1. You have a custom domain configured for your Ory project 2. You're using the Ory CLI, Ory Proxy, or Ory Tunnel for local development 3. You need to ensure that requests go to the intended endpoint without being redirected The header helps prevent redirect loops or unexpected behavior when working with custom domains, especially in development environments where you might be testing against different domains or using local setups. If you're experiencing issues with redirects while using Ory Tunnel or Proxy with a project that has custom domains configured, this header might be relevant to your situation. I don't see more specific documentation about this particular header in the knowledge sources, but it appears to be part of the internal workings of the Ory CLI to handle custom domain configurations properly.
f
@chilly-king-10285 the calls to self-service/browser/login flow is redicting even with ory tunnel to my custom domain instead of localhost...
b
A message from kapa.ai
I understand your issue with Ory Tunnel redirecting to your custom domain instead of localhost. This is a known behavior that can occur when you have a custom domain configured for your Ory project. When you have a custom domain set up and you're using Ory Tunnel for local development, the system might still redirect to your custom domain instead of keeping the traffic on localhost. This happens because the project configuration is prioritizing the custom domain settings. Here are a few approaches to solve this: 1. Use the
--dev
flag with Ory Tunnel
: Make sure you're using the
--dev
flag when starting the tunnel, which disables some security checks for local development:
Copy code
ory tunnel --dev --project $PROJECT_SLUG <http://localhost:3000>
This is recommended in the [local development documentation](https://www.ory.sh/docs/getting-started/local-development#local-development). 2. Check your UI URL configuration: The issue might be related to how your login UI URL is configured. In your Ory project configuration, check the
selfservice.flows.login.ui_url
setting. If this is set to your custom domain, it will redirect there. 3. Use the Ory Proxy instead of Tunnel: As an alternative, you could try using Ory Proxy which has different behavior:
Copy code
ory proxy --project <project-id> --workspace <workspace-id> <http://localhost:3000>
The proxy adds a
/.ory
prefix to paths which might help with your specific setup [Ory Proxy](https://www.ory.sh/docs/guides/cli/proxy-and-tunnel#ory-proxy). This issue has been discussed in GitHub issues like [#124](https://github.com/ory/network/issues/124) and [#149](https://github.com/ory/network/issues/149), where users experienced similar redirection problems when working with custom domains and local development. If you continue to experience issues, you might need to temporarily disable your custom domain configuration while developing locally, or set up your local environment to match your custom domain settings. Let me know if you need more specific guidance based on your setup!