Skip to content
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

feat(vscode-web): support hosting on a subpath with subdomain=false #288

Merged
merged 18 commits into from
Oct 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion vscode-web/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ variable "auto_install_extensions" {
default = false
}

variable "subdomain" {
type = bool
description = <<-EOT
Determines whether the app will be accessed via it's own subdomain or whether it will be accessed via a path on Coder.
If wildcards have not been setup by the administrator then apps with "subdomain" set to true will not be accessible.
EOT
default = true
}

resource "coder_script" "vscode-web" {
agent_id = var.agent_id
display_name = "VS Code Web"
Expand Down Expand Up @@ -160,7 +169,7 @@ resource "coder_app" "vscode-web" {
display_name = var.display_name
url = var.folder == "" ? "http://localhost:${var.port}" : "http://localhost:${var.port}?folder=${var.folder}"
icon = "/icon/code.svg"
subdomain = true
subdomain = var.subdomain
Copy link
Contributor

Choose a reason for hiding this comment

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

Setting subdomain to false breaks the app. I think you'll have to chang the URL format when it's set.

share = var.share
order = var.order

Expand Down