Commit df7e48ec authored by Alessio Caiazza's avatar Alessio Caiazza

Accelerate GraphQL uploads

parent 7d254e63
...@@ -206,6 +206,7 @@ func (u *upstream) configureRoutes() { ...@@ -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. // 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 // 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+`v4/projects/[0-9]+/wikis/attachments\z`, uploadAccelerateProxy),
route("POST", apiPattern+`graphql\z`, uploadAccelerateProxy),
// Explicitly proxy API requests // Explicitly proxy API requests
route("", apiPattern, proxy), route("", apiPattern, proxy),
......
...@@ -116,7 +116,13 @@ func TestAcceleratedUpload(t *testing.T) { ...@@ -116,7 +116,13 @@ func TestAcceleratedUpload(t *testing.T) {
ws := startWorkhorseServer(ts.URL) ws := startWorkhorseServer(ts.URL)
defer ws.Close() 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 { for _, resource := range resources {
reqBody, contentType, err := multipartBodyWithFile() reqBody, contentType, err := multipartBodyWithFile()
require.NoError(t, err) 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