Skip to content

Commit

Permalink
Fix typo microtik -> mikrotik (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc committed Mar 15, 2023
1 parent 6658f29 commit 10187ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/crowdsec-blocklist-mirror.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crowdsec_config:
insecure_skip_verify: false

blocklists:
- format: plain_text # Supported formats are either of "plain_text", "microtik"
- format: plain_text # Supported formats are either of "plain_text", "mikrotik"
endpoint: /security/blocklist
authentication:
type: none # Supported types are either of "none", "ip_based", "basic"
Expand Down
10 changes: 5 additions & 5 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ crowdsec_config:
insecure_skip_verify: false

blocklists:
- format: plain_text # Supported formats are either of "plain_text", "microtik"
- format: plain_text # Supported formats are either of "plain_text", "mikrotik"
endpoint: /security/blocklist
authentication:
type: none # Supported types are either of "none", "ip_based", "basic"
Expand Down Expand Up @@ -130,7 +130,7 @@ List of blocklists to serve. Each blocklist has the following configuration.

#### `format`:

Format of the blocklist. Currently only `plain_text` and `microtik` are supported.
Format of the blocklist. Currently only `plain_text` and `mikrotik` are supported.

#### `endpoint`:

Expand Down Expand Up @@ -197,9 +197,9 @@ Example:
4.3.2.1
```

### microtik
### mikrotik

If your microtik router does not support ipv6, then you can use the global query parameters to only return ipv4 addresses.
If your mikrotik router does not support ipv6, then you can use the global query parameters to only return ipv4 addresses.

Example:

Expand All @@ -210,7 +210,7 @@ Example:
/ip firewall address-list add list=CrowdSec address=4.3.2.1 comment="crowdsecurity/postfix-spam for 166h40m25.280338424s"/ipv6 firewall address-list add list=CrowdSec address=2001:470:1:c84::17 comment="crowdsecurity/ssh-bf for 165h13m42.405449876s"
```

#### microtik query parameters
#### mikrotik query parameters

`?listname=foo` - Set the list name to `foo`, by default `listname` is set to `CrowdSec`

Expand Down
4 changes: 2 additions & 2 deletions formatters.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

var FormattersByName map[string]func(w http.ResponseWriter, r *http.Request) = map[string]func(w http.ResponseWriter, r *http.Request){
"plain_text": PlainTextFormatter,
"microtik": MicroTikFormatter,
"mikrotik": MikroTikFormatter,
}

func PlainTextFormatter(w http.ResponseWriter, r *http.Request) {
Expand All @@ -20,7 +20,7 @@ func PlainTextFormatter(w http.ResponseWriter, r *http.Request) {
}
}

func MicroTikFormatter(w http.ResponseWriter, r *http.Request) {
func MikroTikFormatter(w http.ResponseWriter, r *http.Request) {
decisions := r.Context().Value(globalDecisionRegistry.Key).([]*models.Decision)
listName := r.URL.Query().Get("listname")
if listName == "" {
Expand Down

0 comments on commit 10187ca

Please sign in to comment.