Giter Site home page Giter Site logo

farizap / kong-plugin-path-prefix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexashley/kong-plugin-path-prefix

0.0 0.0 0.0 19 KB

A Kong plugin to rewrite the upstream request path

License: MIT License

Lua 87.71% Makefile 6.49% Dockerfile 5.80%

kong-plugin-path-prefix's Introduction

kong-plugin-path-prefix

A Kong plugin that rewrites the upstream request path. This can be useful if you have routes associated to a single service that all share the same path prefix.

For example, given /foobar, /foobar/version, and /foobar/healthz routes, the resulting upstream request routes will be /, /version, and /healthz, respectively, (assuming that /foobar is set as config.path_prefix).

This plugin is not compatible with APIs or any version older than Kong 0.14.

Usage

Can be installed on either a service or individual routes.

Schema

field explanation default
path_prefix The prefix shared by all routes associated with the service. N/A
escape Whether any hyphens in the path prefix should be escaped true
forwarded_header Add 'X-Forwarded-Prefix' with 'path_prefix' value false

Versions

The version of Kong that this plugin was last tested against is 2.5.0. The following branches have versions of the plugin that worked against the name of the branch:

  • 0.14.x
  • 1.x.x

Development

Run docker-compose up --build to stand up an instance of Kong with the plugin. Integration tests can be run with make test.

kong-plugin-path-prefix's People

Contributors

alexashley avatar felpasl avatar hairymike avatar rmaugusto avatar volbrene avatar

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.