fix(server): use HTTP status OK instead of CREATED for assets (#2876)
The NGINX gzip module does not compress responses with a status of 201, which is a major issue specifically for the /api/asset/time-bucket endpoint where responses can be upwards of 5Mi. The size of the response is dramatically reduced with gzip to 500Ki in some cases. https://trac.nginx.org/nginx/ticket/471 https://trac.nginx.org/nginx/ticket/394 The signature of these endpoints should be GET rather than POST anyway, but that is a bigger discussion.
This commit is contained in:
@@ -1066,7 +1066,7 @@
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
@@ -1595,7 +1595,7 @@
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
@@ -1910,7 +1910,7 @@
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
|
||||
Reference in New Issue
Block a user