McpAppCsp

data class McpAppCsp(val connectDomains: List<String> = emptyList(), val resourceDomains: List<String> = emptyList(), val frameDomains: List<String> = emptyList(), val baseUriDomains: List<String> = emptyList())(source)

The origins a view may reach (MCP Apps McpUiResourceCsp). Empty lists are the secure default: no connections, no external resources, no nested frames, same-origin base URIs.

Constructors

Link copied to clipboard
constructor(connectDomains: List<String> = emptyList(), resourceDomains: List<String> = emptyList(), frameDomains: List<String> = emptyList(), baseUriDomains: List<String> = emptyList())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun header(): String

The Content-Security-Policy for the view (§"Content Security Policy Enforcement"). Only well-formed origins are kept, so a server cannot inject directives or keywords.

Link copied to clipboard
fun toJson(): JsonObject

As MCP McpUiResourceCsp JSON (the host's hostCapabilities.sandbox.csp).