fix(gateway): accept normal tRPC batch paths
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
export const gatewayFastifyRouterOptions = {
|
||||
// tRPC joins batched procedure names in a single route parameter. Fastify's
|
||||
// default limit is 100 characters, which is shorter than normal admin-page
|
||||
// startup batches such as capabilities + profiles + release state.
|
||||
maxParamLength: 2_048,
|
||||
} as const;
|
||||
@@ -28,6 +28,7 @@ import { RepositoryProfileStatusService } from './lobby/profileStatusService.js'
|
||||
import { registerAccountIconInternalRoute } from './auth/accountIconInternalRoute.js';
|
||||
import { installGatewayShutdownController } from './lifecycle/shutdownController.js';
|
||||
import { RemoteUserIconStore } from './account/remoteUserIconStore.js';
|
||||
import { gatewayFastifyRouterOptions } from './fastifyOptions.js';
|
||||
|
||||
export const createGatewayApiServer = async () => {
|
||||
const config = resolveGatewayApiConfigFromEnv();
|
||||
@@ -80,6 +81,7 @@ export const createGatewayApiServer = async () => {
|
||||
|
||||
const app = fastify({
|
||||
logger: true,
|
||||
routerOptions: gatewayFastifyRouterOptions,
|
||||
});
|
||||
|
||||
await app.register(cors, {
|
||||
|
||||
Reference in New Issue
Block a user