forked from Ulexus/traefik-plugin-geoblock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds blocklist functionality, while preserving the allowlist. To make this more useful, we also introduce a default policy: if an IP matches neither allow- or block-list, it will be allowed or not based on the default policy. For CIDR-based lists, higher specificity CIDRs should always take priority to lower-specificity ones. In the event of a tie, the block list should always take priority over the allow list.
- Loading branch information
Showing
4 changed files
with
170 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
displayName: geoblock | ||
type: middleware | ||
import: github.com/nscuro/traefik-plugin-geoblock | ||
summary: traefik plugin to whitelist requests based on geolocation | ||
summary: traefik plugin to block or allow requests based on geolocation | ||
testData: | ||
# It doesn't appear to be possible to get the pilot plugin analyzer | ||
# to load local files. To prevent errors, the plugin is disabled here. | ||
# This will cause the plugin to not attempt to load the database file. | ||
enabled: false | ||
# databaseFilePath: IP2LOCATION-LITE-DB1.IPV6.BIN | ||
# allowedCountries: [ "CH", "DE" ] | ||
# blockedCountries: [ "RU" ] | ||
# defaultAllow: false | ||
# allowPrivate: true | ||
# disallowedStatusCode: 403 | ||
# allowedIPBlocks: ["66.249.64.0/19"] | ||
# allowedIPBlocks: ["66.249.64.0/19"] | ||
# blockedIPBlocks: ["66.249.64.0/24"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters