feat(server): various fixes (#5360)
This commit is contained in:
@@ -1,2 +1,5 @@
|
||||
[tools]
|
||||
node = '22'
|
||||
node = "22.19.0"
|
||||
|
||||
[env]
|
||||
SHARP_IGNORE_GLOBAL_LIBVIPS = 1
|
||||
|
||||
@@ -102,5 +102,8 @@
|
||||
"commitizen": {
|
||||
"path": "cz-conventional-changelog"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"node-gyp": "^11.4.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ export default (app: Router, { executeHooks }: { executeHooks: ExecuteHooks }) =
|
||||
)
|
||||
if (!requestDropped)
|
||||
res
|
||||
.status(400)
|
||||
.status(413)
|
||||
.send(
|
||||
`File size too large (${gzippedBuffer.length} > ${MAX_FILE_SIZE})`
|
||||
)
|
||||
@@ -143,7 +143,7 @@ export default (app: Router, { executeHooks }: { executeHooks: ExecuteHooks }) =
|
||||
)
|
||||
if (!requestDropped)
|
||||
res
|
||||
.status(400)
|
||||
.status(413)
|
||||
.send(
|
||||
`File size too large (${gunzippedBufferMegabyteSize} > ${MAX_FILE_SIZE})`
|
||||
)
|
||||
@@ -258,7 +258,7 @@ export default (app: Router, { executeHooks }: { executeHooks: ExecuteHooks }) =
|
||||
)
|
||||
if (!requestDropped)
|
||||
res
|
||||
.status(400)
|
||||
.status(413)
|
||||
.send(`File size too large (${buffer.length} > ${MAX_FILE_SIZE})`)
|
||||
requestDropped = true
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ server {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
location ~* ^/(graphql|explorer|(auth/.*)|(objects/.*)|(preview/.*)|(api/.*)|(static/.*)) {
|
||||
location ~* ^/(graphql|explorer|(auth/.*)|(preview/.*)|(api/.*)|(static/.*)) {
|
||||
resolver 127.0.0.11 valid=30s;
|
||||
set $upstream_speckle_server speckle-server;
|
||||
client_max_body_size 10m;
|
||||
@@ -24,6 +24,20 @@ server {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
location ~* ^/(objects/.*) {
|
||||
resolver 127.0.0.11 valid=30s;
|
||||
set $upstream_speckle_server speckle-server;
|
||||
client_max_body_size 100m;
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
|
||||
proxy_buffering off;
|
||||
proxy_request_buffering off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
location ~* ^/api/file/.* {
|
||||
resolver 127.0.0.11 valid=30s;
|
||||
set $upstream_speckle_server speckle-server;
|
||||
|
||||
Reference in New Issue
Block a user