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.
11 lines (10 loc) • 480 B
TypeScript
import type { Plugin } from 'vite';
/**
* Vite plugin that adds Content Security Policy headers to all responses.
* Ports packages/cli/src/dev/csp/setup-csp.ts to Vite's configureServer hook.
*
* Note: Vite's own HMR client (/@vite/client) is served on the same origin,
* so 'self' in script-src covers it. The Vite HMR WebSocket reuses the server port,
* so the existing localhost connect-src allowances cover it too.
*/
export declare function dtCspVitePlugin(): Plugin;