TrueChartsClone/templates/questions/traefik/geoBlockMiddleware.yaml

100 lines
4.8 KiB
YAML
Raw Normal View History

- variable: geoBlock
label: GeoBlock
schema:
type: list
default: []
items:
- variable: geoBlockEntry
label: ""
schema:
additional_attrs: true
type: dict
attrs:
- variable: name
label: Name
description: This is a 3rd party plugin and not maintained by TrueCharts,
for more information go to <a href="https://github.com/PascalMinder/geoblock">geoblock</a>
schema:
type: string
required: true
default: ""
- variable: allowLocalRequests
label: Allow Local Requests
description: If set to true, will not block request from Private IP Ranges
schema:
type: boolean
default: true
- variable: logLocalRequests
label: Log Local Requests
description: If set to true, will log every connection from any IP in the private IP range
schema:
type: boolean
default: false
- variable: logAllowedRequests
label: Log Allowed Requests
description: If set to true, will show a log message with the IP and the country of origin if a request is allowed.
schema:
type: boolean
default: false
- variable: logApiRequests
label: Log API Requests
description: If set to true, will show a log message for every API hit.
schema:
type: boolean
default: false
- variable: api
label: API
description: Defines the API URL for the IP to Country resolution. The IP to fetch can be added with {ip} to the URL.
schema:
type: string
required: true
default: https://get.geojs.io/v1/ip/country/{ip}
- variable: apiTimeoutMs
label: API Timeout in ms
description: Timeout for the call to the api uri.
schema:
type: int
required: true
default: 500
- variable: cacheSize
label: Cache Size
description: Defines the max size of the LRU (least recently used) cache.
schema:
type: int
required: true
default: 25
- variable: forceMonthlyUpdate
label: Force Monthly Update
description: Even if an IP stays in the cache for a period of a month (about 30 x 24 hours), it must be fetch again after a month.
schema:
type: boolean
default: true
- variable: allowUnknownCountries
label: Allow Unknown Countries
description: Some IP addresses have no country associated with them. If this option is set to true, all IPs with no associated country are also allowed.
schema:
type: boolean
default: false
- variable: unknownCountryApiResponse
label: Unknown Countries API Response
description: The API uri can be customized. This options allows to customize the response string of the API when a IP with no associated country is requested.
schema:
type: string
required: true
default: nil
- variable: countries
label: Blocked Countries
schema:
type: list
default: []
items:
- variable: blockedCountryEntry
label: Blocked Country
description: Country codes (2 characters) from which connections to the service should be allowed.
schema:
type: string
required: true
# Allow only 2 Characters
valid_chars: '^[a-zA-Z]{2}$'
default: ""