Allow restricting this to certain HTTP verbs

Open
#14 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
backend

Research direction

Review the plugin's configuration and HTTP middleware request handling to see how regex block entries are parsed and matched. Add support for optional HTTP methods, preserving all-method blocking when methods are omitted, and verify that configured verbs are blocked only for their matching paths.

Written by the indexing model from the issue text.

Description

A helpful addition to this is the ability to configure a list of HTTP verbs for each regex path which allows to configure which verbs to block for specific paths. There are use cases where only certain verbs need to be blocked.

Are you willing to take a PR implementing this?

A sample config for this might look like:

testData:
  blockentries:
  - regex:
    - "^/foo(.*)"
    methods:
    - POST
    - GET
  - regex:
    - "^/foo-blockallmethods(.*)"

Dominant language
Go
Stars
28
Forks
18
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from traefik/plugin-blockpath

All issues in traefik/plugin-blockpath

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.