Comments (1)
Hello @arendhummeling ,
thank for your interest in Traefik.
If I understood correctly, you aim to return a 401 when the header name is not present (return by your backend I guess).
I can suggest you a workaround. You can define 2 routes like this:
http:
routers:
RouterWithRatelimit:
entryPoints:
- web
middlewares:
- rate-limit
service: myBackend
rule: Host(`example.com`) && HeaderRegexp(`Api-Key`, `^.+$`)
RouterWithOutRatelimit:
entryPoints:
- web
service: myBackend
rule: Host(`example.com`)
By using https://doc.traefik.io/traefik/v3.0/routing/routers/#header-and-headerregexp, only request that contains the header is ratelimited.
Still, we are interested in this issue, but weβre unsure about the use case and the traction it will receive. We are going to leave the status as kind/proposal to give the community time to let us know if they would like this idea.
We will reevaluate as people respond.
If you or another community member would like to build it before that happens, let us know, and we will work with you to make sure you have all the information needed.
Let us know here before you start. We prefer to work with our community members at the beginning of the design process to ensure that we are aligned and can move quickly with the review and merge process.
from traefik.
Related Issues (20)
- TLS certificate generation mix the CN and SANs HOT 1
- Keep URIs in server list
- Add shellrent as dnschallenge provider HOT 2
- Plugin file or directory could not be found in Pod HOT 2
- Create a cross namespace load balancing using IngressRouteTCP, where only the last service can be accessed HOT 4
- Only one node serve proper certificate HOT 3
- traefik_service_requests_total Inaccurate total count
- InfluxDB Metrics provider not working in v3.0 HOT 3
- Error with StripPrefix Middleware : `field not found, node: forceSlash` HOT 2
- Access log has many items with "0" HOT 2
- MySQL client cannot connect to database when using SNI routing with TLS HOT 1
- [v3] Support the traefik.http.*.tls.passthrough label again HOT 1
- providers.docker.defaultrule HOT 4
- Dashboard No longer working HOT 7
- bogus greeting in traefik -> traefik communication HOT 4
- using forwardAuth + authResponseHeaders drops some original client headers HOT 1
- PathPrefix RegEx HOT 3
- ReplacePathRegex - Allow Empty String for `replacement` HOT 3
- Missing Docker Swarm logo HOT 2
- Support different TLS options for different ClientIP in the same Host HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traefik.