Skip to content

Commit ba52fed

Browse files
committed
Add CODER_ENABLE_WILDCARD_APPS env var
1 parent 8e7f8bd commit ba52fed

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

site/src/components/PortForwardButton/PortForwardButton.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ export const PortForwardButton: React.FC<React.PropsWithChildren<PortForwardButt
2929
const styles = useStyles()
3030
const [port, setPort] = useState("3000")
3131
const { location } = window
32-
const urlExample = `${location.protocol}//${port}--${workspaceName}--${agentName}--${username}.${location.host}`
32+
const urlExample =
33+
process.env.CODER_ENABLE_WILDCARD_APPS === "true"
34+
? `${location.protocol}//${port}--${workspaceName}--${agentName}--${username}.${location.host}`
35+
: `${location.protocol}//${location.host}/@${username}/${workspaceName}/apps/${port}`
3336

3437
const onClose = () => {
3538
setIsOpen(false)

site/webpack.common.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ import { Configuration, EnvironmentPlugin } from "webpack"
1414
const environmentPlugin = new EnvironmentPlugin({
1515
INSPECT_XSTATE: "",
1616
CODER_VERSION: "main",
17+
CODER_ENABLE_WILDCARD_APPS: "",
1718
})
1819
console.info(`--- Setting INSPECT_XSTATE to '${process.env.INSPECT_XSTATE || ""}'`)
1920
console.info(`--- Setting CODER_VERSION to '${process.env.CODER_VERSION || "main"}'`)
21+
console.info(
22+
`--- Setting CODER_ENABLE_WILDCARD_APPS to '${process.env.CODER_ENABLE_WILDCARD_APPS ?? ""}'`,
23+
)
2024
console.info(`--- Setting NODE_ENV to '${process.env.NODE_ENV || ""}'`)
2125

2226
/**

0 commit comments

Comments
 (0)