-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly parse the API URL in dashboard #511
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks okay to me, but we should make this more implicit/less opinionated in the future
Agree. This is a quick fix. New dashboard should handle this better |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -45,7 +53,7 @@ export const DeveloperContent = ({ | |||
<pre className="mt-2 w-full bg-neutral-700 px-2 py-1 rounded-md text-brand-300"> | |||
E2B_DOMAIN={ | |||
isUrl(apiUrl) | |||
? `"${new URL(apiUrl).host}"` | |||
? `"${removeApiSubdomain(new URL(apiUrl))}"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? `"${removeApiSubdomain(new URL(apiUrl))}"` | |
? removeApiSubdomain(new URL(apiUrl)) |
This PR addresses a bug when a user passes a custom API URL like
https://api.e2b-cluster.dev
and we incorrectly print that the user should set theirE2B_DOMAIN
toapi.e2b-cluster.dev
while the correct one would beE2B_DOMAIN=e2b-cluster.dev
.