mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-09 23:48:05 -05:00
fix: allow 25MB uploads for migrations
This commit is contained in:
@@ -4,9 +4,12 @@ import { readLimit } from "@app/server/config/rateLimiter";
|
|||||||
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
||||||
import { AuthMode } from "@app/services/auth/auth-type";
|
import { AuthMode } from "@app/services/auth/auth-type";
|
||||||
|
|
||||||
|
const MB25_IN_BYTES = 26214400;
|
||||||
|
|
||||||
export const registerExternalMigrationRouter = async (server: FastifyZodProvider) => {
|
export const registerExternalMigrationRouter = async (server: FastifyZodProvider) => {
|
||||||
server.route({
|
server.route({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
bodyLimit: MB25_IN_BYTES,
|
||||||
url: "/env-key",
|
url: "/env-key",
|
||||||
config: {
|
config: {
|
||||||
rateLimit: readLimit
|
rateLimit: readLimit
|
||||||
|
|||||||
@@ -15,6 +15,21 @@ server {
|
|||||||
proxy_cookie_path / "/; HttpOnly; SameSite=strict";
|
proxy_cookie_path / "/; HttpOnly; SameSite=strict";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /api/v3/migrate {
|
||||||
|
client_max_body_size 25M;
|
||||||
|
|
||||||
|
proxy_set_header X-Real-RIP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-NginX-Proxy true;
|
||||||
|
|
||||||
|
proxy_pass http://backend:4000;
|
||||||
|
proxy_redirect off;
|
||||||
|
|
||||||
|
proxy_cookie_path / "/; HttpOnly; SameSite=strict";
|
||||||
|
}
|
||||||
|
|
||||||
location /.well-known/est {
|
location /.well-known/est {
|
||||||
proxy_set_header X-Real-RIP $remote_addr;
|
proxy_set_header X-Real-RIP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|||||||
@@ -17,6 +17,21 @@ server {
|
|||||||
proxy_cookie_path / "/; HttpOnly; SameSite=strict";
|
proxy_cookie_path / "/; HttpOnly; SameSite=strict";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /api/v3/migrate {
|
||||||
|
client_max_body_size 25M;
|
||||||
|
|
||||||
|
proxy_set_header X-Real-RIP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-NginX-Proxy true;
|
||||||
|
|
||||||
|
proxy_pass http://backend:4000;
|
||||||
|
proxy_redirect off;
|
||||||
|
|
||||||
|
proxy_cookie_path / "/; HttpOnly; SameSite=strict";
|
||||||
|
}
|
||||||
|
|
||||||
location /.well-known/est {
|
location /.well-known/est {
|
||||||
|
|
||||||
proxy_set_header X-Real-RIP $remote_addr;
|
proxy_set_header X-Real-RIP $remote_addr;
|
||||||
|
|||||||
Reference in New Issue
Block a user