Commit a0d68429 authored by Nick Thomas's avatar Nick Thomas

Merge branch 'ac-accelerate-graphql' into 'master'

Accelerate GraphQL uploads

See merge request gitlab-org/gitlab-workhorse!403
parents 7d254e63 df7e48ec
......@@ -206,6 +206,7 @@ func (u *upstream) configureRoutes() {
// we need to declare each routes until we have fixed all the routes on the rails codebase.
// Overall status can be seen at https://gitlab.com/groups/gitlab-org/-/epics/1802#current-status
route("POST", apiPattern+`v4/projects/[0-9]+/wikis/attachments\z`, uploadAccelerateProxy),
route("POST", apiPattern+`graphql\z`, uploadAccelerateProxy),
// Explicitly proxy API requests
route("", apiPattern, proxy),
......
......@@ -116,7 +116,13 @@ func TestAcceleratedUpload(t *testing.T) {
ws := startWorkhorseServer(ts.URL)
defer ws.Close()
resources := []string{`/example`, `/uploads/personal_snippet`, `/uploads/user`, `/api/v4/projects/1/wikis/attachments`}
resources := []string{
`/example`,
`/uploads/personal_snippet`,
`/uploads/user`,
`/api/v4/projects/1/wikis/attachments`,
`/api/graphql`,
}
for _, resource := range resources {
reqBody, contentType, err := multipartBodyWithFile()
require.NoError(t, err)
......
Markdown is supported
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