feat: Allow option publicServerURL to be set dynamically as asynchronous function (#9803)

This commit is contained in:
Daniel
2025-11-08 05:18:58 +11:00
committed by GitHub
parent f27b050e4d
commit 460a65cf61
9 changed files with 247 additions and 17 deletions

View File

@@ -85,7 +85,7 @@ export interface ParseServerOptions {
cacheAdapter?: Adapter<CacheAdapter>;
emailAdapter?: Adapter<MailAdapter>;
encodeParseObjectInCloudFunction?: boolean;
publicServerURL?: string;
publicServerURL?: string | (() => string) | (() => Promise<string>);
pages?: PagesOptions;
customPages?: CustomPagesOptions;
liveQuery?: LiveQueryOptions;

View File

@@ -26,6 +26,11 @@ declare class ParseServer {
* @returns {Promise<void>} a promise that resolves when the server is stopped
*/
handleShutdown(): Promise<void>;
/**
* @static
* Allow developers to customize each request with inversion of control/dependency injection
*/
static applyRequestContextMiddleware(api: any, options: any): void;
/**
* @static
* Create an express app for the parse server