File tree 3 files changed +128
-130
lines changed
3 files changed +128
-130
lines changed Original file line number Diff line number Diff line change @@ -8,20 +8,22 @@ export default defineNuxtConfig({
8
8
"@nuxtjs/google-fonts" ,
9
9
"@nuxtjs/fontaine" ,
10
10
"@vueuse/nuxt" ,
11
- "nuxt-security "
11
+ "nuxt-rate-limit "
12
12
] ,
13
13
ui : {
14
14
icons : [ "heroicons" , "lucide" ] ,
15
15
} ,
16
- security : {
17
- headers : {
18
- crossOriginEmbedderPolicy :
19
- process . env . NODE_ENV === "development" ? "unsafe-none" : "require-corp" ,
20
- } ,
21
- } ,
22
16
colorMode : {
23
17
preference : "dark" ,
24
18
} ,
19
+ nuxtRateLimit : {
20
+ routes : {
21
+ '/api/*' : {
22
+ maxRequests : 5 ,
23
+ intervalSeconds : 60 ,
24
+ } ,
25
+ } ,
26
+ } ,
25
27
app : {
26
28
head : {
27
29
script : [
@@ -33,23 +35,6 @@ export default defineNuxtConfig({
33
35
] ,
34
36
} ,
35
37
} ,
36
- routeRules : {
37
- "/api/*" : {
38
- security : {
39
- rateLimiter : {
40
- tokensPerInterval : 5 ,
41
- interval : 30000 ,
42
- driver : {
43
- name : "cloudflare-kv-binding" ,
44
- options : {
45
- binding : "CODESHARE_RATE_LIMITER" ,
46
- } ,
47
- } ,
48
- throwError : false ,
49
- } ,
50
- } ,
51
- } ,
52
- } ,
53
38
googleFonts : {
54
39
display : "swap" ,
55
40
families : {
Original file line number Diff line number Diff line change 20
20
"nitro-cloudflare-dev" : " ^0.0.7" ,
21
21
"nuxt" : " ^3.9.1" ,
22
22
"nuxt-icon" : " ^0.6.8" ,
23
- "nuxt-security " : " ^1.0.1 " ,
23
+ "nuxt-rate-limit " : " ^1.1.0 " ,
24
24
"vue" : " ^3.4.13" ,
25
25
"vue-router" : " ^4.2.5" ,
26
26
"wrangler" : " ^3.24.0"
You can’t perform that action at this time.
0 commit comments