UNPKG

dt-app

Version:

The Dynatrace App Toolkit is a tool you can use from your command line to create, develop, and deploy apps on your Dynatrace environment.

20 lines (19 loc) 1.2 kB
import type { FastifyPluginCallback } from 'fastify'; import type { ResolvedCliOptions } from '../../utils/config/cli-options'; /** App Framework API prefix that should be proxied, see [AppFW URL]/swagger-ui */ export declare const APPFW_API_PATH_PREFIX = "/platform"; /** List of HTTP headers that should be excluded from forwarded requests */ export declare const APPFW_PROXY_IGNORED_HEADERS: string[]; /** The maximum allowed HTTP body size for forwarded responses */ export declare const APPFW_PROXY_MAX_BODY_SIZE = 128000000; /** Configuration options */ export type FastifyAppfwPluginOptions = Pick<ResolvedCliOptions, 'root' | 'environmentUrl' | 'app' | 'build' | 'icon'> & { /** A method that can provide an OAuth 2.0 bearer token */ getBearerToken: () => Promise<string>; }; /** Factory function for creating a fastify app framework plugin */ export declare function fastifyAppfwPlugin(options: FastifyAppfwPluginOptions): { plugin: FastifyPluginCallback; }; /** Checks if the redirectUrl has the same origin as the environmentUrl and if it is directing to the runtime.js endpoint */ export declare function isAllowedRedirect(environmentUrl: string, redirectUrl: string): boolean;