8000 feat(vscode-web): support hosting on a subpath with `subdomain=false` by Emyrk · Pull Request #288 · coder/modules · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

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
Prev Previous commit
Next Next commit
add TODO comment
  • Loading branch information
Emyrk committed Aug 29, 2024
commit 97dceabcda31175826dbb37a152bcaed45a06b8f
6 changes: 2 additions & 4 deletions vscode-web/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ resource "coder_script" "vscode-web" {
EXTENSIONS_DIR : var.extensions_dir,
FOLDER : var.folder,
AUTO_INSTALL_EXTENSIONS : var.auto_install_extensions,
// TODO: This assumes the agent is called "main"
SERVER_BASE_PATH : format("/@%s/%s.%s/apps/vscode-web/",
data.coder_workspace_owner.me.name, data.coder_workspace.me.name, "main"),
})
Expand All @@ -173,10 +174,7 @@ resource "coder_app" "vscode-web" {
slug = var.slug
display_name = var.display_name

// @Emyrk/code-server.main/apps/vscode-web/
// -> Coder -> "/"

url = var.folder == "http://localhost:${var.port}/@Emyrk/code-server.main/apps/vscode-web/"
url = var.folder == "" ? "http://localhost:${var.port}" : "http://localhost:${var.port}?folder=${var.folder}"
icon = "/icon/code.svg"
subdomain = var.subdomain
share = var.share
Expand Down
0