Skip to content
generated from traefik/plugindemo

A plugin that always answer the same status code without calling a service/server.

License

Notifications You must be signed in to change notification settings

traefik-contrib/noop

Repository files navigation

Noop

A plugin that always answer the same status code without calling a service/server.

The response code can be configured.

Configuration

The following declaration (given here in YAML) defines a plugin:

# Static configuration

experimental:
  plugins:
    noop:
      moduleName: github.com/traefik-contrib/noop
      version: v0.1.0

Here is an example of a file provider dynamic configuration (given here in YAML), where the interesting part is the http.middlewares section:

# Dynamic configuration

http:
  routers:
    my-router:
      rule: host(`demo.localhost`)
      service: service-foo
      entryPoints:
        - web
      middlewares:
        - my-plugin

  services:
   service-foo:
      loadBalancer:
        servers:
          - url: http://127.0.0.1:5000

  middlewares:
    my-plugin:
      plugin:
        noop:
          responseCode: 200

About

A plugin that always answer the same status code without calling a service/server.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks