Update Composer packages
This commit is contained in:
parent
9252d9ce90
commit
134266af8a
176 changed files with 7930 additions and 2262 deletions
|
@ -69,10 +69,15 @@ class Document
|
|||
'custom' => static::customAsset('panel.css'),
|
||||
],
|
||||
'icons' => static::favicon($url),
|
||||
// loader for plugins' index.dev.mjs files – inlined, so we provide the code instead of the asset URL
|
||||
// loader for plugins' index.dev.mjs files –
|
||||
// inlined, so we provide the code instead of the asset URL
|
||||
'plugin-imports' => $plugins->read('mjs'),
|
||||
'js' => [
|
||||
'vendor' => [
|
||||
'vue' => [
|
||||
'nonce' => $nonce,
|
||||
'src' => $url . '/js/vue.js'
|
||||
],
|
||||
'vendor' => [
|
||||
'nonce' => $nonce,
|
||||
'src' => $url . '/js/vendor.js',
|
||||
'type' => 'module'
|
||||
|
@ -82,17 +87,17 @@ class Document
|
|||
'src' => $url . '/js/plugins.js',
|
||||
'type' => 'module'
|
||||
],
|
||||
'plugins' => [
|
||||
'plugins' => [
|
||||
'nonce' => $nonce,
|
||||
'src' => $plugins->url('js'),
|
||||
'defer' => true
|
||||
],
|
||||
'custom' => [
|
||||
'custom' => [
|
||||
'nonce' => $nonce,
|
||||
'src' => static::customAsset('panel.js'),
|
||||
'type' => 'module'
|
||||
],
|
||||
'index' => [
|
||||
'index' => [
|
||||
'nonce' => $nonce,
|
||||
'src' => $url . '/js/index.js',
|
||||
'type' => 'module'
|
||||
|
@ -115,6 +120,9 @@ class Document
|
|||
'type' => 'module'
|
||||
];
|
||||
|
||||
// load the development version of Vue
|
||||
$assets['js']['vue']['src'] = $url . '/node_modules/vue/dist/vue.js';
|
||||
|
||||
unset($assets['css']['index'], $assets['js']['vendor']);
|
||||
}
|
||||
|
||||
|
@ -270,6 +278,16 @@ class Document
|
|||
'panelUrl' => $uri->path()->toString(true) . '/',
|
||||
]);
|
||||
|
||||
return new Response($body, 'text/html', $code);
|
||||
$frameAncestors = $kirby->option('panel.frameAncestors');
|
||||
$frameAncestors = match (true) {
|
||||
$frameAncestors === true => "'self'",
|
||||
is_array($frameAncestors) => "'self' " . implode(' ', $frameAncestors),
|
||||
is_string($frameAncestors) => $frameAncestors,
|
||||
default => "'none'"
|
||||
};
|
||||
|
||||
return new Response($body, 'text/html', $code, [
|
||||
'Content-Security-Policy' => 'frame-ancestors ' . $frameAncestors
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue