Class McpAppResourceMetadata.ContentSecurityPolicy
java.lang.Object
com.soklet.McpAppResourceMetadata.ContentSecurityPolicy
- Enclosing class:
McpAppResourceMetadata
Immutable allowlists of canonical ASCII origins, not raw CSP header sources.
Empty collections allow no additional external connection, resource, or
frame origins and retain same-origin-only document base URIs. Host enforcement
may impose further restrictions. A wildcard is permitted only as one leftmost
DNS label, such as https://*.example.com.
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classMutable builder for an immutable content security policy. -
Method Summary
-
Method Details
-
defaultInstance
Returns the immutable default policy, equivalent tobuilder().build().All four origin allowlists are empty: no additional external connection, resource, or frame origins are declared, and document base URIs remain same-origin-only. Enforcement belongs to the host, which may further restrict the policy.
Supplying this value explicitly emits CSP metadata. Leaving the policy unspecified omits that metadata, but still requires the host to apply restrictive defaults; omission does not disable sandbox protection.
- Returns:
- default content security policy
-
builder
- Returns:
- mutable builder with empty origin allowlists
-
getConnectDomains
- Returns:
- immutable connection origins in canonical ASCII order
-
getResourceDomains
- Returns:
- immutable asset origins in canonical ASCII order
-
getFrameDomains
- Returns:
- immutable iframe origins in canonical ASCII order
-
getBaseUriDomains
- Returns:
- immutable document-base origins in canonical ASCII order
-
equals
-
hashCode
-
toString
-