diff options
author | MCMXC <16797721+mcmxcdev@users.noreply.github.com> | 2024-02-10 18:37:40 -0700 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2024-02-13 06:59:44 +0530 |
commit | e1c47572a6235fd8fd20af888ac3a11c7ae1369d (patch) | |
tree | 2dccff36a441916d7014037cef3f7ce84a790cad /config/shield.ts | |
parent | refactor: project maintenance (diff) | |
download | ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.tar.gz ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.tar.zst ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.zip |
updates
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 | }); |