@liberstudio/cloudflare-list 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -4
- package/package.json +39 -38
package/README.md
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
# Modulo NestJS per la gestione IP List Cloudflare
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
## Prima di iniziare
|
|
4
|
+
|
|
5
|
+
1. Creare un account Cloudflare
|
|
6
|
+
2. Scegliere il Dominio da utilizzare
|
|
7
|
+
3. Manage Account > Configuration > List > Create List
|
|
8
|
+
4. Account API tokens > Create Token > Create Custom Token (Permission: Account > Account WAF > Edit, Account > Account Filter List > Edit)
|
|
9
|
+
5. Salvare il token API senza scadenza
|
|
10
|
+
6. Domains > Scegliere il dominio da utilizzare
|
|
11
|
+
7. Andare nella categoria Security > Security Rules > Create rule > Custom Rules
|
|
12
|
+
8. Nome: <Name>, Field: <IP Source Address , is in, scegli la lista creata prima>, Action: <Block>
|
|
13
|
+
9. Salvare la regola
|
|
14
|
+
10. Creare un token API
|
|
4
15
|
|
|
5
16
|
## Installazione
|
|
6
17
|
|
|
7
18
|
```bash
|
|
8
|
-
npm install @
|
|
19
|
+
npm install @liberstudio/cloudflare-list
|
|
9
20
|
```
|
|
10
21
|
|
|
11
22
|
## Utilizzo
|
|
@@ -15,7 +26,7 @@ npm install @lbr/cloudflare-list
|
|
|
15
26
|
Nel file di configurazione del progetto, aggiungere il modulo all'import della configurazione:
|
|
16
27
|
|
|
17
28
|
```typescript
|
|
18
|
-
import { CloudflareAttacksModule } from "@
|
|
29
|
+
import { CloudflareAttacksModule } from "@liberstudio/cloudflare-list";
|
|
19
30
|
|
|
20
31
|
@Module({
|
|
21
32
|
imports: [
|
package/package.json
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@liberstudio/cloudflare-list",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "Modulo NestJS per gestione IP List Cloudflare",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist"
|
|
9
|
-
],
|
|
10
|
-
"scripts": {
|
|
11
|
-
"build": "npx tsc",
|
|
12
|
-
"prepublishOnly": "npm run build",
|
|
13
|
-
"version:bump": "npm version patch --no-git-tag-version"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"@nestjs/
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"@nestjs/
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"@types/
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@liberstudio/cloudflare-list",
|
|
3
|
+
"version": "2.0.3",
|
|
4
|
+
"description": "Modulo NestJS per gestione IP List Cloudflare",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "npx tsc",
|
|
12
|
+
"prepublishOnly": "npm run build",
|
|
13
|
+
"version:bump": "npm version patch --no-git-tag-version",
|
|
14
|
+
"pub": "npm run build && npm publish --access public"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"simple-git-hooks": {
|
|
20
|
+
"pre-commit": "npm run version:bump && git add package.json package-lock.json"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@nestjs/axios": ">=3.0.0",
|
|
25
|
+
"@nestjs/common": ">=10.0.0",
|
|
26
|
+
"axios": ">=1.0.0",
|
|
27
|
+
"rxjs": ">=7.0.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@nestjs/axios": ">=3.0.0",
|
|
31
|
+
"@nestjs/common": ">=10.0.0",
|
|
32
|
+
"axios": ">=1.0.0",
|
|
33
|
+
"rxjs": "^7.8.0",
|
|
34
|
+
"@types/express": "^5.0.6",
|
|
35
|
+
"@types/node": "^20.9.0",
|
|
36
|
+
"simple-git-hooks": "^2.13.1",
|
|
37
|
+
"typescript": ">=5.0.0"
|
|
38
|
+
}
|
|
39
|
+
}
|