https://github.com/jdel/staticresponse
Traefik middleware plugin for generating static response
https://github.com/jdel/staticresponse
traefik-plugin
Last synced: 4 months ago
JSON representation
Traefik middleware plugin for generating static response
- Host: GitHub
- URL: https://github.com/jdel/staticresponse
- Owner: jdel
- License: apache-2.0
- Created: 2023-01-17T08:38:04.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-17T22:30:57.000Z (over 3 years ago)
- Last Synced: 2024-06-21T13:28:25.141Z (about 2 years ago)
- Topics: traefik-plugin
- Language: Go
- Homepage:
- Size: 67.4 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Traefik Plugin: staticresponse
This repository contains a Traefik middleware used for hijacking requests and responsing with a predefined code, headers and body. The request is never sent to the backend.
Heavily inspired by the `plugindemo` and `noop` traefik plugins.
## Usage
Follow traefik's instructions https://plugins.traefik.io/install.
```yml
experimental:
plugins:
staticresponse:
moduleName: "github.com/jdel/staticresponse"
version: "v0.0.1"
```
## Configuration
Check the `docker-compose.yml` file for examples with docker labels.
Check the `example-dynamic-config.yml` file for examples with config file.