mirror of
https://github.com/fosrl/docs.git
synced 2025-05-13 05:40:41 +01:00
Update 03-geoblock.md
This commit is contained in:
parent
b2cf7b906a
commit
593ceb3667
1 changed files with 10 additions and 6 deletions
|
@ -2,7 +2,9 @@
|
|||
|
||||
## Installation
|
||||
|
||||
1. Add following lines to your `/config/traefik/traefik_config.yml` file.
|
||||
To integrate GeoBlock into your Traefik setup, follow the steps below:
|
||||
|
||||
1. Add the following configuration to your `/config/traefik/traefik_config.yml` file:
|
||||
```yaml
|
||||
entryPoints:
|
||||
websecure:
|
||||
|
@ -17,7 +19,7 @@ experimental:
|
|||
version: v0.3.2
|
||||
```
|
||||
|
||||
2. Add following lines to your `/config/traefik/dynamic_config.yml` file. With `blackListMode: false` GeoBlock is running in whitelist mode and just allows the added countries. Keep in mind to add countries when you are traveling. Find all county codes in the [documentation](https://github.com/PascalMinder/geoblock#full-plugin-sample-configuration).
|
||||
2. Add the following configuration to your `/config/traefik/dynamic_config.yml` file. Setting `blackListMode: false` enables GeoBlock in whitelist mode, allowing only the specified countries. Remember to add the appropriate countries when traveling. A list of country codes can be found in the [documentation](https://github.com/PascalMinder/geoblock#full-plugin-sample-configuration).
|
||||
```yaml
|
||||
http:
|
||||
middlewares:
|
||||
|
@ -40,14 +42,16 @@ http:
|
|||
- DE # add/replace with your country code
|
||||
```
|
||||
|
||||
3. Restart traefik
|
||||
3. Restart Traefik to apply the changes:
|
||||
```bash
|
||||
docker restart traefik
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
Change these options to true to see the GeoBlock activities in the traefik logs.
|
||||
To monitor GeoBlock activities in the Traefik logs, enable logging by setting the following options to `true`:
|
||||
```yaml
|
||||
logLocalRequests: true
|
||||
logAllowedRequests: true
|
||||
logApiRequests: true
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue