Add security.txt (#181)
* Add security.txt * Add security.txt * Update website.conf * Update security label * Add eslint linebreak for windows * Removed backwards compability security.txt encryption * Update .eslintrc.js * Update security component * Change location redirect on security.txt to absolute path * Moved security.txt config into security.conf
This commit is contained in:
parent
b48162a3e2
commit
8bc06372a3
|
@ -50,6 +50,19 @@ export default (domains, global) => {
|
||||||
deny: 'all',
|
deny: 'all',
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
|
// Security.txt
|
||||||
|
if (global.security.securityTxt.computed) {
|
||||||
|
config.push(['# security.txt', '']);
|
||||||
|
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}`,
|
||||||
|
}]);
|
||||||
|
}
|
||||||
|
|
||||||
// Done!
|
// Done!
|
||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
|
|
|
@ -102,6 +102,41 @@ THE SOFTWARE.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="field is-horizontal">
|
||||||
|
<div class="field-label">
|
||||||
|
<label class="label">security.txt</label>
|
||||||
|
</div>
|
||||||
|
<div class="field-body">
|
||||||
|
<div class="field">
|
||||||
|
<div :class="`control${securityTxt ? ' is-changed' : ''}`">
|
||||||
|
<div class="checkbox">
|
||||||
|
<PrettyCheck v-model="securityTxt" class="p-default p-curve p-fill p-icon">
|
||||||
|
<i slot="extra" class="icon fas fa-check"></i>
|
||||||
|
{{ i18n.common.enable }}
|
||||||
|
</PrettyCheck>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="$props.data.securityTxt.computed" class="field is-horizontal">
|
||||||
|
<div class="field-label">
|
||||||
|
<label class="label">security.txt path</label>
|
||||||
|
</div>
|
||||||
|
<div class="field-body">
|
||||||
|
<div class="field">
|
||||||
|
<div :class="`control${securityTxtChanged ? ' is-changed' : ''}`">
|
||||||
|
<input v-model="securityTxtPath"
|
||||||
|
class="input"
|
||||||
|
type="text"
|
||||||
|
:placeholder="$props.data.securityTxtPath.default"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -139,6 +174,14 @@ THE SOFTWARE.
|
||||||
default: false,
|
default: false,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
|
securityTxt: {
|
||||||
|
default: false,
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
securityTxtPath: {
|
||||||
|
default: '~/security.txt',
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
Loading…
Reference in New Issue