Skip to content

Allow serving apps at / #3378

@ammario

Description

@ammario

Problem Statement

resource "coder_app" "code-server" {
  agent_id = coder_agent.main.id
  url      = "http://localhost:8080/?folder=/home/coder"
  icon     = "/icon/code.svg"
}

And then is accessed at a URL like https://dev.coder.com/@ammario/moria/apps/code-server.

While many web applications can be configured to serve at specific paths instead of root, it's not always obvious, possible, or convenient.

In these cases, an organization may prefer setting up a wildcard domain so their users can use apps at /. We should add this setting in coderd since it would likely be configured alongside the main access URL. A coder admin could set it to cdr.app and then requests for {agent_id}-{app_name}.cdr.app could forward to a particular app.

Definition of done

Users can access coder_app via a subdomain instead of a path

example schema:

resource "coder_app" "code-server" {
  agent_id = coder_agent.main.id
  url      = "http://localhost:8080/?folder=/home/coder"
  icon     = "/icon/code.svg"
+ relative = true
}

- # url is https://coder.example.com/@workspace/app
+ # url is https://workspace-app.coder.example.com/

Metadata

Metadata

Assignees

Labels

apiArea: HTTP API

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy