diff options
Diffstat (limited to 'config/shield.ts')
-rw-r--r-- | config/shield.ts | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/config/shield.ts b/config/shield.ts index c88df25..ed69aa2 100644 --- a/config/shield.ts +++ b/config/shield.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import env from '#start/env' | 1 | import env from '#start/env'; |
2 | import { defineConfig } from '@adonisjs/shield' | 2 | import { defineConfig } from '@adonisjs/shield'; |
3 | 3 | ||
4 | export default defineConfig({ | 4 | export default defineConfig({ |
5 | csp: { | 5 | csp: { |
@@ -67,9 +67,12 @@ export default defineConfig({ | |||
67 | | ``` | 67 | | ``` |
68 | | | 68 | | |
69 | */ | 69 | */ |
70 | exceptRoutes: (ctx) => { | 70 | exceptRoutes: ctx => { |
71 | // ignore all routes starting with /v1/ (api) | 71 | // ignore all routes starting with /v1/ (api) |
72 | return ctx.request.url().includes('/v1/') || ctx.request.url().includes('/import') | 72 | return ( |
73 | ctx.request.url().includes('/v1/') || | ||
74 | ctx.request.url().includes('/import') | ||
75 | ); | ||
73 | }, | 76 | }, |
74 | 77 | ||
75 | /* | 78 | /* |
@@ -135,4 +138,4 @@ export default defineConfig({ | |||
135 | contentTypeSniffing: { | 138 | contentTypeSniffing: { |
136 | enabled: true, | 139 | enabled: true, |
137 | }, | 140 | }, |
138 | }) | 141 | }); |