Initial commit

This commit is contained in:
Rutra
2026-02-25 00:34:39 +01:00
commit 54b0fc3485
178 changed files with 12761 additions and 0 deletions

30
config/shield.js Normal file
View File

@@ -0,0 +1,30 @@
import { defineConfig } from '@adonisjs/shield';
const shieldConfig = defineConfig({
csp: {
enabled: false,
directives: {},
reportOnly: false,
},
csrf: {
enabled: true,
exceptRoutes: (ctx) => {
const p = ctx.route?.pattern ?? '';
return p.startsWith('/api') || p.startsWith('/admin');
},
enableXsrfCookie: false,
methods: ['POST', 'PUT', 'PATCH', 'DELETE'],
},
xFrame: {
enabled: true,
action: 'DENY',
},
hsts: {
enabled: true,
maxAge: '180 days',
},
contentTypeSniffing: {
enabled: true,
},
});
export default shieldConfig;
//# sourceMappingURL=shield.js.map