Add support for Content-Security-Policy in images
This commit adds support for the "Content-Security-Policy" header in the barrel images.
This commit is contained in:
parent
17d64826df
commit
760aae0dc1
32 changed files with 162 additions and 48 deletions
|
|
@ -12,6 +12,8 @@
|
|||
bottom: 1em;
|
||||
}
|
||||
|
||||
/* WissKI Status */
|
||||
|
||||
.wisski.running {
|
||||
background-color: #9ADA07;
|
||||
}
|
||||
|
|
@ -20,6 +22,16 @@
|
|||
background-color: #ff7a7a;
|
||||
}
|
||||
|
||||
.disabled {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.overflow {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* Informational Chips */
|
||||
|
||||
.info-chip {
|
||||
min-width: 75px;
|
||||
height: 15px;
|
||||
|
|
@ -27,4 +39,24 @@
|
|||
display: block;
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.info-chip.note {
|
||||
background-color: gray;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.info-chip.info {
|
||||
background-color: green;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.info-chip.warning {
|
||||
background-color: yellow;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.info-chip.error {
|
||||
background-color: red;
|
||||
color: #000;
|
||||
}
|
||||
|
|
@ -7,12 +7,13 @@ const provision = document.getElementById('provision') as HTMLFormElement
|
|||
const slug = document.getElementById('slug') as HTMLInputElement
|
||||
const php = document.getElementById('php') as HTMLSelectElement
|
||||
const opcacheDevelopment = document.getElementById('opcacheDevelopment') as HTMLInputElement
|
||||
const contentSecurityPolicy = document.getElementById('contentsecuritypolicy') as HTMLInputElement
|
||||
|
||||
// add an event handler to open the modal form!
|
||||
provision.addEventListener('submit', (evt) => {
|
||||
evt.preventDefault()
|
||||
|
||||
Provision({ Slug: slug.value, System: { PHP: php.value, OpCacheDevelopment: opcacheDevelopment.checked } })
|
||||
Provision({ Slug: slug.value, System: { PHP: php.value, OpCacheDevelopment: opcacheDevelopment.checked, ContentSecurityPolicy: contentSecurityPolicy.value } })
|
||||
.then(slug => {
|
||||
location.href = '/admin/instance/' + slug
|
||||
})
|
||||
|
|
|
|||
|
|
@ -3,16 +3,17 @@ import '../Admin/index.css'
|
|||
|
||||
import { Rebuild } from '~/src/lib/remote/api'
|
||||
|
||||
const rebuild = document.getElementById('rebuild') as HTMLFormElement
|
||||
const slug = document.getElementById('slug') as HTMLInputElement
|
||||
const provision = document.getElementById('provision') as HTMLFormElement
|
||||
const php = document.getElementById('php') as HTMLSelectElement
|
||||
const opcacheDevelopment = document.getElementById('opcacheDevelopment') as HTMLInputElement
|
||||
const contentSecurityPolicy = document.getElementById('contentsecuritypolicy') as HTMLInputElement
|
||||
|
||||
// add an event handler to open the modal form!
|
||||
provision.addEventListener('submit', (evt) => {
|
||||
rebuild.addEventListener('submit', (evt) => {
|
||||
evt.preventDefault()
|
||||
|
||||
Rebuild(slug.value, { PHP: php.value, OpCacheDevelopment: opcacheDevelopment.checked })
|
||||
Rebuild(slug.value, { PHP: php.value, OpCacheDevelopment: opcacheDevelopment.checked, ContentSecurityPolicy: contentSecurityPolicy.value })
|
||||
.then(slug => {
|
||||
location.href = '/admin/instance/' + slug
|
||||
})
|
||||
|
|
@ -20,4 +21,4 @@ provision.addEventListener('submit', (evt) => {
|
|||
})
|
||||
|
||||
// enable the form!
|
||||
provision.querySelector('fieldset')?.removeAttribute('disabled')
|
||||
rebuild.querySelector('fieldset')?.removeAttribute('disabled')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue