All Projects → stone-payments → kong-plugin-url-rewrite

stone-payments / kong-plugin-url-rewrite

Licence: Apache-2.0 license
Kong API Gateway plugin for url-rewrite purposes

Programming Languages

lua
6591 projects
Makefile
30231 projects
javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to kong-plugin-url-rewrite

kong-plugin-api-response-merger
Kong API response merger plugin
Stars: ✭ 14 (-67.44%)
Mutual labels:  api-gateway, kong, kong-plugin
kong-map
Kongmap is a free visualization tool which allows you to view and edit configurations of your Kong API Gateway Clusters, including Routes, Services, and Plugins/Policies. The tool is being offered for installation via Docker and Kubernetes at this time.
Stars: ✭ 60 (+39.53%)
Mutual labels:  api-gateway, kong, kong-plugin
gluu-gateway
Gluu API 🚀 and Web Gateway 🎯
Stars: ✭ 29 (-32.56%)
Mutual labels:  api-gateway, kong, kong-plugin
kong-scalable-rate-limiter
Kong plugin for Rate Limiting at high throughputs.
Stars: ✭ 19 (-55.81%)
Mutual labels:  api-gateway, kong, kong-plugin
kong-plugin-http-anti-replay-attack
http-anti-replay-attack [防重放攻击]
Stars: ✭ 20 (-53.49%)
Mutual labels:  kong, kong-plugin
kong-circuit-breaker
Kong plugin for wrapping all proxy calls with a circuit-breaker
Stars: ✭ 27 (-37.21%)
Mutual labels:  kong, kong-plugin
kong-oidc-auth
OpenID Connect authentication with Kong gateway
Stars: ✭ 41 (-4.65%)
Mutual labels:  api-gateway, kong
kubernetes-sidecar-injector
Easy Service Mesh with Kong and Kubernetes
Stars: ✭ 20 (-53.49%)
Mutual labels:  kong, kong-plugin
kong-java-client
Java Client for Kong API Gateway configuration
Stars: ✭ 69 (+60.47%)
Mutual labels:  api-gateway, kong
kong-ui
UI for KONG API Gateway
Stars: ✭ 20 (-53.49%)
Mutual labels:  api-gateway, kong
kong-upstream-jwt
A plugin for Kong which adds a signed JWT to HTTP Headers to backend requests
Stars: ✭ 40 (-6.98%)
Mutual labels:  api-gateway, kong
kong-plugin-acme
Let's Encrypt and ACMEv2 integration with Kong - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Stars: ✭ 36 (-16.28%)
Mutual labels:  kong, kong-plugin
kong-plugin-grpc-gateway
Kong Plugin to transcode REST request to gRPC - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Stars: ✭ 15 (-65.12%)
Mutual labels:  kong, kong-plugin
django-api-bouncer
Simple Django app to provide API Gateways for micro-services
Stars: ✭ 18 (-58.14%)
Mutual labels:  api-gateway, kong
kong
Kong docker image that easily installs plugins from source code.
Stars: ✭ 20 (-53.49%)
Mutual labels:  api-gateway, kong
kong-api-gateway-plugin-and-microservices-demo
Creating plugin for Kong API Gateway and Simple micro services example
Stars: ✭ 20 (-53.49%)
Mutual labels:  kong, kong-plugin
kong-plugin-zipkin
A Kong plugin for propogating zipkin spans and reporting spans to a zipkin server - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Stars: ✭ 60 (+39.53%)
Mutual labels:  kong, kong-plugin
okta-api-center
Get up and running quickly with Okta's OAuth as a Service and your favorite API Gateway.
Stars: ✭ 58 (+34.88%)
Mutual labels:  api-gateway, kong
Kong Docs Cn
微服务 Api 网关 Kong 最新文档中文版
Stars: ✭ 371 (+762.79%)
Mutual labels:  api-gateway, kong
Kong
🦍 The Cloud-Native API Gateway
Stars: ✭ 30,838 (+71616.28%)
Mutual labels:  api-gateway, kong

Build Status

Kong-plugin-url-rewrite

Kong API Gateway plugin for url-rewrite purposes. This plugin has been tested to work along with kong >= 2.6.x, for a legacy version of this plugin, please check this link.

The Problem

When using Kong, you can create routes that proxy to an upstream. The problem lies when the upstream has an url that is not very friendly to your clients, or restful, or even pretty. When you add a Route in Kong, you have a somewhat limited url rewrite capability. This plugin simply throws away the url set in Kong route and uses the url set in it's configuration to proxy to the upstream. This gives you full freedom as to how to write your url's in Kong and inner services as well.

Project Structure

The plugin folder should contain at least a schema.lua and a handler.lua, alongside with a spec folder and a .rockspec file specifying the current version of the package.

Rockspec Format

The .rockspec file should follow LuaRocks' conventions

Configuration

Enabling the plugin on a Route

Configure this plugin on a Route with:

curl -X POST http://kong:8001/routes/{route_id}/plugins \
    --data "name=kong-plugin-url-rewrite"  \
    --data "config.url=http://new-url.com"
  • route_id: the id of the Route that this plugin configuration will target.
  • config.url: the url where you want kong to execute the request.

Developing

In docker

docker build . -t kong-plugin-url-rewrite-dev
docker run -it -v ${PWD}/url-rewrite:/url-rewrite kong-plugin-url-rewrite-dev bash

Credits

made with ❤️ by Stone Payments

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].