https://github.com/traefik-contrib/noop
A plugin that always answer the same status code without calling a service/server.
https://github.com/traefik-contrib/noop
traefik-plugin
Last synced: 6 months ago
JSON representation
A plugin that always answer the same status code without calling a service/server.
- Host: GitHub
- URL: https://github.com/traefik-contrib/noop
- Owner: traefik-contrib
- License: apache-2.0
- Created: 2022-10-17T07:36:29.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-21T14:13:06.000Z (over 3 years ago)
- Last Synced: 2024-06-19T23:14:47.402Z (about 2 years ago)
- Topics: traefik-plugin
- Language: Go
- Homepage:
- Size: 53.7 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```yaml
# 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:
```yaml
# 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
```