Skip to content

feat: Add portforward to the UI #3812

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

Merged
merged 8 commits into from
Sep 13, 2022
Merged

feat: Add portforward to the UI #3812

merged 8 commits into from
Sep 13, 2022

Conversation

BrunoQuaresma
Copy link
Collaborator

Preview:
image

Blocked by #3753

Closes #3516

@BrunoQuaresma BrunoQuaresma self-assigned this Sep 1, 2022
@BrunoQuaresma BrunoQuaresma requested a review from a team as a code owner September 1, 2022 18:52
@BrunoQuaresma BrunoQuaresma requested review from presleyp and removed request for a team September 1, 2022 18:52
@bpmct
Copy link
Member

bpmct commented Sep 1, 2022

A note from #1624:

  • If an admin doesn't set up a wildcard domain, the port forwarding dropdown should not use a subdomain.
    • Coder Classic entirely disabled port forwarding via the dashboard when coderd. devurlsHost was not set.
      @bpmct suggestion: use a deployment-wide environment variable to enable subdomain apps. When disabled, use path URLs and link to docs to enable subdomains via the dropdown (many apps don't work by default as a path).

Co-authored-by: Presley Pizzo <1290996+presleyp@users.noreply.github.com>
@BrunoQuaresma
Copy link
Collaborator Author

@bpmct thanks for bringing it to my attention!

@BrunoQuaresma
Copy link
Collaborator Author

const [port, setPort] = useState("3000")
const { location } = window
const urlExample =
process.env.CODER_ENABLE_WILDCARD_APPS === "true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be compiled by webpack, and isn't a dynamic environment variable at runtime. If we want to have a proper environment variable passed through, it'll have to come via the backend.

kylecarbs added a commit that referenced this pull request Sep 13, 2022
kylecarbs added a commit that referenced this pull request Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Access and share arbitrary ports from the UI
5 participants