Add screening tag
parent
d8e7addab6
commit
7b1fd2aaee
|
@ -59,7 +59,7 @@ export default (domains, global) => {
|
||||||
|
|
||||||
// Custom security.txt path
|
// Custom security.txt path
|
||||||
config.push(['location = /.well-known/security.txt', {
|
config.push(['location = /.well-known/security.txt', {
|
||||||
alias: `${global.security.securityTxtPath.value}`,
|
alias: `${global.security.securityTxtPath.computed}`,
|
||||||
}]);
|
}]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -208,7 +208,6 @@ THE SOFTWARE.
|
||||||
watch: {
|
watch: {
|
||||||
'$props.data.domain': {
|
'$props.data.domain': {
|
||||||
handler(data) {
|
handler(data) {
|
||||||
data.computed = data.computed.replace(/<.+>/, '');
|
|
||||||
// Ignore www. if given, enable WWW subdomain
|
// Ignore www. if given, enable WWW subdomain
|
||||||
if (data.computed.startsWith('www.')) {
|
if (data.computed.startsWith('www.')) {
|
||||||
data.computed = data.computed.slice(4);
|
data.computed = data.computed.slice(4);
|
||||||
|
@ -244,31 +243,12 @@ THE SOFTWARE.
|
||||||
// Ensure there is a default path
|
// Ensure there is a default path
|
||||||
'$props.data.path': {
|
'$props.data.path': {
|
||||||
handler(data) {
|
handler(data) {
|
||||||
data.computed = data.computed.replace(/<.+>/, '');
|
|
||||||
if (!data.computed.trim()) {
|
if (!data.computed.trim()) {
|
||||||
data.computed = `/var/www/${this.$props.data.domain.computed}`;
|
data.computed = `/var/www/${this.$props.data.domain.computed}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
'$props.data.documentRoot': {
|
|
||||||
handler(data) {
|
|
||||||
data.computed = data.computed.replace(/<.+>/, '');
|
|
||||||
},
|
|
||||||
deep: true,
|
|
||||||
},
|
|
||||||
'$props.data.listenIpv4': {
|
|
||||||
handler(data) {
|
|
||||||
data.computed = data.computed.replace(/<.+>/, '');
|
|
||||||
},
|
|
||||||
deep: true,
|
|
||||||
},
|
|
||||||
'$props.data.listenIpv6': {
|
|
||||||
handler(data) {
|
|
||||||
data.computed = data.computed.replace(/<.+>/, '');
|
|
||||||
},
|
|
||||||
deep: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -372,12 +372,6 @@ THE SOFTWARE.
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
'$props.data.letsEncryptCertRoot': {
|
|
||||||
handler(data) {
|
|
||||||
data.computed = data.computed.replace(/<.+>/, '');
|
|
||||||
},
|
|
||||||
deep: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -27,7 +27,7 @@ THE SOFTWARE.
|
||||||
<template>
|
<template>
|
||||||
<div :class="`column ${half ? 'is-half' : 'is-full'} is-full-mobile is-full-tablet`" @copied="copied">
|
<div :class="`column ${half ? 'is-half' : 'is-full'} is-full-mobile is-full-tablet`" @copied="copied">
|
||||||
<h3 v-html="name"></h3>
|
<h3 v-html="name"></h3>
|
||||||
<pre><code class="language-nginx" v-html="conf"></code></pre>
|
<pre><code class="language-nginx" v-html="showConf"></code></pre>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -39,6 +39,26 @@ THE SOFTWARE.
|
||||||
conf: String,
|
conf: String,
|
||||||
half: Boolean,
|
half: Boolean,
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
htmlEntityConf: '',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
showConf() {
|
||||||
|
return this.htmlEntityConf || this.conf;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
conf: {
|
||||||
|
handler( value ) {
|
||||||
|
if( ( /<|>/gm ).test( value ) ) {
|
||||||
|
this.htmlEntityConf = value.replaceAll(/</g, '<').replaceAll(/>/g, '>');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.info(`Highlighting ${this.$props.name}...`);
|
console.info(`Highlighting ${this.$props.name}...`);
|
||||||
window.Prism.highlightAllUnder(this.$el);
|
window.Prism.highlightAllUnder(this.$el);
|
||||||
|
|
Loading…
Reference in New Issue