PascalMinder / geoblock

Traefik middleware plugin - Deny requests based on country of origin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plugin manifest error

ezruneko opened this issue · comments

Traefik version: 2.8.1

traefik.yml

experimental:
  localPlugins:
    geoblock:
      moduleName: github.com/PascalMinder/GeoBlock

Crash with only add this four lines and traefik can't started.

The log error:

2022/07/21 08:59:15 traefik.go:80: command traefik error: 1 error occurred:
	* failed to open the plugin manifest plugins-local/src/github.com/PascalMinder/GeoBlock/.traefik.yml: open plugins-local/src/github.com/PascalMinder/GeoBlock/.traefik.yml: no such file or directory

can you change the line moduleName: github.com/PascalMinder/GeoBlock to moduleName: github.com/PascalMinder/geoblock?

Same error with url in lowercaser

2022/07/21 09:24:52 traefik.go:80: command traefik error: 1 error occurred:
	* failed to open the plugin manifest plugins-local/src/github.com/PascalMinder/geoblock/.traefik.yml: open plugins-local/src/github.com/PascalMinder/geoblock/.traefik.yml: no such file or directory

Did you want to configure it as a local plugin? This would mean you have to manually install all files at the right location.

i've followed your readme at https://github.com/PascalMinder/geoblock/blob/main/readme.md

but one second to add:

experimental:
hub: true
plugins:
geoblock:
modulename: github.com/PascalMinder/geoblock
version: v0.2.3

Working with the next configuration without localPlugins tag

traefik.yml

entryPoints:
    http:
      middlewares:
        - geoblock-plugin@file
experimental:
 plugins:
    geoblock:
      modulename: github.com/PascalMinder/geoblock
      version: v0.2.3

http-geoblock.yml

http:
  middlewares:
    geoblock-plugin:
      plugin:
        geoblock:
               ....

The one in the readme shows how to install it as a local plugin. This means, you also would have to add the folder with the source of the plugin to your docker container.

i've recommend you to add both options to the readme to avoid noob post like me :( and add a comment to this "localPlugins" with the full process. thank you for your support

Updated readme