Giter VIP home page Giter VIP logo

requestpolicy's Introduction

RequestPolicy Middleware

Build Status

RequestPolicy Middleware is a Traefik plugin that allows you to control access to HTTP requests based on path and query parameter configurations.

Features

  • Support for whitelist and blacklist for paths and query parameters.
  • Ability to specify regular expressions for paths and query parameters.
  • Validation of regular expressions when creating a new instance of the middleware.

Configuration

Static

pilot:
    token: "xxx"

experimental:
    plugins:
        requestpolicy:
            modulename: "github.com/alexkachalkov/requestpolicy"
            version: "v0.0.1"

Dynamic

To configure the RequestPolicy plugin you should create a middleware in your dynamic configuration. The following example creates and uses the requestpolicy middleware plugin to allow all HTTP requests with a path starting with /api and block all HTTP requests with a path starting with /admin.

http:
    routers:
        my-router:
            rule: "Host(`localhost`)"
            middlewares: ["requestpolicy"]
            service: "my-service"

    middlewares:
        requestpolicy:
            plugin:
                requestpolicy:
                    whitelistPaths:
                        - PathRegex: "^/api/.*"
                          QueryParamRegex: "(page)=.*"
                    blacklistPaths:
                        - PathRegex: "^/admin/.*"
                          QueryParamRegex: "(token)=.*"

    services:
        my-service:
            loadBalancer:
                servers:
                    - url: "http://127.0.0.1"

requestpolicy's People

Contributors

alexkachalkov avatar

Watchers

 avatar

requestpolicy's Issues

[Traefik Plugin Catalog] Plugin Analyzer has detected a problem.

The plugin was not imported into Traefik Plugin Catalog.

Cause:

the import "github.com/alexkachalkov/requestpolicy" must be related to the module name "github.com/traefik/pluginproviderdemo"

Traefik Plugin Analyzer will restart when you will close this issue.

If you believe there is a problem with the Analyzer or this issue is the result of a false positive, please fill an issue on piceus repository.

[Traefik Plugin Catalog] Plugin Analyzer has detected a problem.

The plugin was not imported into Traefik Plugin Catalog.

Cause:

the import "github.com/alexkachalkov/requestpolicy" must be related to the module name "github.com/traefik/pluginproviderdemo"

Traefik Plugin Analyzer will restart when you will close this issue.

If you believe there is a problem with the Analyzer or this issue is the result of a false positive, please fill an issue on piceus repository.

[Traefik Plugin Catalog] Plugin Analyzer has detected a problem.

The plugin was not imported into Traefik Plugin Catalog.

Cause:

the import "github.com/alexkachalkov/requestpolicy" must be related to the module name "github.com/traefik/pluginproviderdemo"

Traefik Plugin Analyzer will restart when you will close this issue.

If you believe there is a problem with the Analyzer or this issue is the result of a false positive, please fill an issue on piceus repository.

[Traefik Plugin Catalog] Plugin Analyzer has detected a problem.

The plugin was not imported into Traefik Plugin Catalog.

Cause:

the import "github.com/alexkachalkov/requestpolicy" must be related to the module name "github.com/traefik/pluginproviderdemo"

Traefik Plugin Analyzer will restart when you will close this issue.

If you believe there is a problem with the Analyzer or this issue is the result of a false positive, please fill an issue on piceus repository.

[Traefik Plugin Catalog] Plugin Analyzer has detected a problem.

The plugin was not imported into Traefik Plugin Catalog.

Cause:

the import "github.com/alexkachalkov/requestpolicy" must be related to the module name "github.com/traefik/pluginproviderdemo"

Traefik Plugin Analyzer will restart when you will close this issue.

If you believe there is a problem with the Analyzer or this issue is the result of a false positive, please fill an issue on piceus repository.

[Traefik Plugin Catalog] Plugin Analyzer has detected a problem.

The plugin was not imported into Traefik Plugin Catalog.

Cause:

the import "github.com/alexkachalkov/requestpolicy" must be related to the module name "github.com/traefik/pluginproviderdemo"

Traefik Plugin Analyzer will restart when you will close this issue.

If you believe there is a problem with the Analyzer or this issue is the result of a false positive, please fill an issue on piceus repository.

[Traefik Plugin Catalog] Plugin Analyzer has detected a problem.

The plugin was not imported into Traefik Plugin Catalog.

Cause:

the import "github.com/alexkachalkov/requestpolicy" must be related to the module name "github.com/traefik/pluginproviderdemo"

Traefik Plugin Analyzer will restart when you will close this issue.

If you believe there is a problem with the Analyzer or this issue is the result of a false positive, please fill an issue on piceus repository.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.