Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-workhorse
Commits
77183dbf
Commit
77183dbf
authored
Dec 19, 2019
by
Dmitriy Zaporozhets
Committed by
Nick Thomas
Dec 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update environment websocket route
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
ddb591f5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
channel_test.go
channel_test.go
+1
-1
doc/channel.md
doc/channel.md
+2
-2
internal/upstream/routes.go
internal/upstream/routes.go
+1
-1
No files found.
channel_test.go
View file @
77183dbf
...
@@ -20,7 +20,7 @@ import (
...
@@ -20,7 +20,7 @@ import (
)
)
var
(
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
)
jobTerminalPath
=
fmt
.
Sprintf
(
"%s/-/jobs/1/terminal.ws"
,
testProject
)
servicesProxyWSPath
=
fmt
.
Sprintf
(
"%s/-/jobs/1/proxy.ws"
,
testProject
)
servicesProxyWSPath
=
fmt
.
Sprintf
(
"%s/-/jobs/1/proxy.ws"
,
testProject
)
)
)
...
...
doc/channel.md
View file @
77183dbf
...
@@ -50,9 +50,9 @@ UTF-8 strings, in addition to any subprotocol expectations.
...
@@ -50,9 +50,9 @@ UTF-8 strings, in addition to any subprotocol expectations.
Using the terminal as an example, GitLab serves a JavaScript terminal
Using the terminal as an example, GitLab serves a JavaScript terminal
emulator to the browser on a URL like
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.,
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.
This endpoint doesn't exist in GitLab - only in Workhorse.
When receiving the connection, Workhorse first checks that the
When receiving the connection, Workhorse first checks that the
...
...
internal/upstream/routes.go
View file @
77183dbf
...
@@ -191,7 +191,7 @@ func (u *upstream) configureRoutes() {
...
@@ -191,7 +191,7 @@ func (u *upstream) configureRoutes() {
route
(
"POST"
,
ciAPIPattern
+
`v1/builds/[0-9]+/artifacts\z`
,
contentEncodingHandler
(
artifacts
.
UploadArtifacts
(
api
,
proxy
))),
route
(
"POST"
,
ciAPIPattern
+
`v1/builds/[0-9]+/artifacts\z`
,
contentEncodingHandler
(
artifacts
.
UploadArtifacts
(
api
,
proxy
))),
// Terminal websocket
// 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
)),
wsRoute
(
projectPattern
+
`-/jobs/[0-9]+/terminal.ws\z`
,
channel
.
Handler
(
api
)),
// Proxy Job Services
// Proxy Job Services
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment