- Docker infrastructure (Dockerfile, docker-compose.yml, genieacs-sim) - AdonisJS v7 app with Inertia.js + Vue 3 - MongoDB integration - CWMP/TR-069 state machine engine - Configuration engine with compliance tracking - Branding: ADAM ACS (favicon, navbar, locales) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
55 lines
1.0 KiB
TypeScript
55 lines
1.0 KiB
TypeScript
import { defineConfig } from '@adonisjs/shield'
|
|
|
|
const shieldConfig = defineConfig({
|
|
/**
|
|
* Configure CSP policies for your app. Refer documentation
|
|
* to learn more
|
|
*/
|
|
csp: {
|
|
enabled: false,
|
|
directives: {},
|
|
reportOnly: false,
|
|
},
|
|
|
|
/**
|
|
* Configure CSRF protection options. Refer documentation
|
|
* to learn more
|
|
*/
|
|
csrf: {
|
|
enabled: true,
|
|
exceptRoutes: (ctx) => {
|
|
const url = ctx.request.url()
|
|
return url === '/cwmp10' || url.startsWith('/api/v1/')
|
|
},
|
|
enableXsrfCookie: true,
|
|
methods: ['POST', 'PUT', 'PATCH', 'DELETE'],
|
|
},
|
|
|
|
/**
|
|
* Control how your website should be embedded inside
|
|
* iFrames
|
|
*/
|
|
xFrame: {
|
|
enabled: true,
|
|
action: 'DENY',
|
|
},
|
|
|
|
/**
|
|
* Force browser to always use HTTPS
|
|
*/
|
|
hsts: {
|
|
enabled: true,
|
|
maxAge: '180 days',
|
|
},
|
|
|
|
/**
|
|
* Disable browsers from sniffing the content type of a
|
|
* response and always rely on the "content-type" header.
|
|
*/
|
|
contentTypeSniffing: {
|
|
enabled: true,
|
|
},
|
|
})
|
|
|
|
export default shieldConfig
|