Commit 77183dbf authored by Dmytro Zaporozhets (DZ)'s avatar Dmytro Zaporozhets (DZ) 🌴 Committed by Nick Thomas
Browse files

Update environment websocket route


Signed-off-by: Dmytro Zaporozhets (DZ)'s avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent ddb591f5
......@@ -20,7 +20,7 @@ import (
)
var (
envTerminalPath = fmt.Sprintf("%s/environments/1/terminal.ws", testProject)
envTerminalPath = fmt.Sprintf("%s/-/environments/1/terminal.ws", testProject)
jobTerminalPath = fmt.Sprintf("%s/-/jobs/1/terminal.ws", testProject)
servicesProxyWSPath = fmt.Sprintf("%s/-/jobs/1/proxy.ws", testProject)
)
......
......@@ -50,9 +50,9 @@ UTF-8 strings, in addition to any subprotocol expectations.
Using the terminal as an example, GitLab serves a JavaScript terminal
emulator to the browser on a URL like
`https://gitlab.com/group/project/environments/1/terminal`.
`https://gitlab.com/group/project/-/environments/1/terminal`.
This opens a websocket connection to, e.g.,
`wss://gitlab.com/group/project/environments/1/terminal.ws`,
`wss://gitlab.com/group/project/-/environments/1/terminal.ws`,
This endpoint doesn't exist in GitLab - only in Workhorse.
When receiving the connection, Workhorse first checks that the
......
......@@ -191,7 +191,7 @@ func (u *upstream) configureRoutes() {
route("POST", ciAPIPattern+`v1/builds/[0-9]+/artifacts\z`, contentEncodingHandler(artifacts.UploadArtifacts(api, proxy))),
// Terminal websocket
wsRoute(projectPattern+`environments/[0-9]+/terminal.ws\z`, channel.Handler(api)),
wsRoute(projectPattern+`-/environments/[0-9]+/terminal.ws\z`, channel.Handler(api)),
wsRoute(projectPattern+`-/jobs/[0-9]+/terminal.ws\z`, channel.Handler(api)),
// Proxy Job Services
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment