Update website.conf
This commit is contained in:
parent
0b945b4532
commit
c3a37123a7
|
@ -342,24 +342,14 @@ export default (domain, domains, global) => {
|
||||||
config.push(['server', redirectConfig]);
|
config.push(['server', redirectConfig]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Security.txt
|
||||||
if(global.security.securityTxt.computed){
|
if(global.security.securityTxt.computed){
|
||||||
config.push(['# security.txt', '']);
|
config.push(['# security.txt', '']);
|
||||||
config.push(['location /security.txt', {
|
config.push(['location /security.txt', {
|
||||||
return: `301 http://${domain.server.wwwSubdomain.computed ? 'www.' : ''}${domain.server.domain.computed}/.well-known/security.txt`,
|
return: `301 http://${domain.server.wwwSubdomain.computed ? 'www.' : ''}${domain.server.domain.computed}/.well-known/security.txt`,
|
||||||
}]);
|
}]);
|
||||||
const securityTxtDetail = [];
|
|
||||||
if(global.security.securityTxtContact.value) {
|
|
||||||
securityTxtDetail.push(['Contact', `${global.security.securityTxtContact.value}`]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(global.security.securityTxtPreferredLanguages.value) {
|
|
||||||
securityTxtDetail.push(['Preferred-Languages', `${global.security.securityTxtPreferredLanguages.value}`]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(global.security.securityTxtEncryption.value) {
|
|
||||||
securityTxtDetail.push(['Encryption', `${global.security.securityTxtEncryption.value}`]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// 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.value}`,
|
||||||
}]);
|
}]);
|
||||||
|
|
|
@ -137,54 +137,6 @@ THE SOFTWARE.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="$props.data.securityTxt.computed" class="field is-horizontal">
|
|
||||||
<div class="field-label">
|
|
||||||
<label class="label">Contact</label>
|
|
||||||
</div>
|
|
||||||
<div class="field-body">
|
|
||||||
<div class="field">
|
|
||||||
<div :class="`control${securityTxtChanged ? ' is-changed' : ''}`">
|
|
||||||
<input v-model="securityTxtContact"
|
|
||||||
class="input"
|
|
||||||
type="text"
|
|
||||||
:placeholder="`security@example.com`"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="$props.data.securityTxt.computed" class="field is-horizontal">
|
|
||||||
<div class="field-label">
|
|
||||||
<label class="label">Encryption</label>
|
|
||||||
</div>
|
|
||||||
<div class="field-body">
|
|
||||||
<div class="field">
|
|
||||||
<div :class="`control${securityTxtChanged ? ' is-changed' : ''}`">
|
|
||||||
<input v-model="securityTxtEncryption"
|
|
||||||
class="input"
|
|
||||||
type="text"
|
|
||||||
:placeholder="`https://example.com/pgp-key.txt`"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="$props.data.securityTxt.computed" class="field is-horizontal">
|
|
||||||
<div class="field-label">
|
|
||||||
<label class="label">Preferred-Languages</label>
|
|
||||||
</div>
|
|
||||||
<div class="field-body">
|
|
||||||
<div class="field">
|
|
||||||
<div :class="`control${securityTxtChanged ? ' is-changed' : ''}`">
|
|
||||||
<input v-model="securityTxtPreferredLanguages"
|
|
||||||
class="input"
|
|
||||||
type="text"
|
|
||||||
:placeholder="`en, es, ru`"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -229,17 +181,6 @@ THE SOFTWARE.
|
||||||
default: '~/security.txt',
|
default: '~/security.txt',
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
securityTxtContact: {
|
|
||||||
default: 'security@example.com',
|
|
||||||
enabled: true,
|
|
||||||
},
|
|
||||||
securityTxtPreferredLanguages: {
|
|
||||||
default: 'en',
|
|
||||||
enabled: true,
|
|
||||||
},
|
|
||||||
securityTxtEncryption: {
|
|
||||||
enabled: true,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -37,8 +37,6 @@ const globalMap = {
|
||||||
|
|
||||||
referrer_policy: ['security', 'referrerPolicy'],
|
referrer_policy: ['security', 'referrerPolicy'],
|
||||||
security_txt: ['security', 'securityTxt', oldBool],
|
security_txt: ['security', 'securityTxt', oldBool],
|
||||||
security_txt_contact: ['security', 'securityTxtContact'],
|
|
||||||
security_txt_languages: ['security', 'securityTxtPreferredLanguages'],
|
|
||||||
security_txt_path: ['security', 'securityTxtPreferredLanguages'],
|
security_txt_path: ['security', 'securityTxtPreferredLanguages'],
|
||||||
security_txt_encryption: ['security', 'securityTxtEncryption'],
|
security_txt_encryption: ['security', 'securityTxtEncryption'],
|
||||||
content_security_policy: ['security', 'contentSecurityPolicy'],
|
content_security_policy: ['security', 'contentSecurityPolicy'],
|
||||||
|
|
Loading…
Reference in New Issue