fix: use camelCase for CSP domain fields in specification
Change connect_domains and resource_domains to connectDomains and resourceDomains for consistency with the rest of the specification which uses camelCase naming convention. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
34316a2180
commit
a446e80b5f
1 changed files with 7 additions and 7 deletions
|
|
@ -174,8 +174,8 @@ The resource content is returned via `resources/read`:
|
||||||
_meta?: {
|
_meta?: {
|
||||||
ui?: {
|
ui?: {
|
||||||
csp?: {
|
csp?: {
|
||||||
connect_domains?: string[]; // Origins for fetch/XHR/WebSocket
|
connectDomains?: string[]; // Origins for fetch/XHR/WebSocket
|
||||||
resource_domains?: string[]; // Origins for images, scripts, etc
|
resourceDomains?: string[]; // Origins for images, scripts, etc
|
||||||
};
|
};
|
||||||
domain?: string;
|
domain?: string;
|
||||||
prefersBorder?: boolean;
|
prefersBorder?: boolean;
|
||||||
|
|
@ -228,8 +228,8 @@ Example:
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"ui" : {
|
"ui" : {
|
||||||
"csp": {
|
"csp": {
|
||||||
"connect_domains": ["https://api.openweathermap.org"],
|
"connectDomains": ["https://api.openweathermap.org"],
|
||||||
"resource_domains": ["https://cdn.jsdelivr.net"]
|
"resourceDomains": ["https://cdn.jsdelivr.net"]
|
||||||
},
|
},
|
||||||
"prefersBorder": true
|
"prefersBorder": true
|
||||||
}
|
}
|
||||||
|
|
@ -1111,9 +1111,9 @@ const cspValue = `
|
||||||
default-src 'none';
|
default-src 'none';
|
||||||
script-src 'self' 'unsafe-inline';
|
script-src 'self' 'unsafe-inline';
|
||||||
style-src 'self' 'unsafe-inline';
|
style-src 'self' 'unsafe-inline';
|
||||||
connect-src 'self' ${csp?.connect_domains?.join(' ') || ''};
|
connect-src 'self' ${csp?.connectDomains?.join(' ') || ''};
|
||||||
img-src 'self' data: ${csp?.resource_domains?.join(' ') || ''};
|
img-src 'self' data: ${csp?.resourceDomains?.join(' ') || ''};
|
||||||
font-src 'self' ${csp?.resource_domains?.join(' ') || ''};
|
font-src 'self' ${csp?.resourceDomains?.join(' ') || ''};
|
||||||
frame-src 'none';
|
frame-src 'none';
|
||||||
object-src 'none';
|
object-src 'none';
|
||||||
base-uri 'self';
|
base-uri 'self';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue