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