feat: Add serving applications on subdomains and port-based proxying (#3753)

Co-authored-by: Dean Sheather <dean@deansheather.com>
This commit is contained in:
Steven Masley
2022-09-14 03:31:33 +10:00
committed by GitHub
co-authored by Dean Sheather
parent 99a7a8dd22
commit 9ab437d6e2
16 changed files with 895 additions and 88 deletions
+4 -1
View File
@@ -28,7 +28,10 @@ export const AppLink: FC<PropsWithChildren<AppLinkProps>> = ({
appCommand,
}) => {
const styles = useStyles()
let href = `/@${userName}/${workspaceName}.${agentName}/apps/${encodeURIComponent(appName)}`
// The backend redirects if the trailing slash isn't included, so we add it
// here to avoid extra roundtrips.
let href = `/@${userName}/${workspaceName}.${agentName}/apps/${encodeURIComponent(appName)}/`
if (appCommand) {
href = `/@${userName}/${workspaceName}.${agentName}/terminal?command=${encodeURIComponent(
appCommand,