Questions tagged [kong-plugin]
168 questions
0
votes
1 answer
Should the internal request be sent to api-gateway in microservices architecture?
I am creating a microservice architecture.
Suppose I have three services: alpha, beta, gamma
and suppose the end-user sends a request to alpha and the structure is such that the alpha needs to send a request to beta and beta to gamma.
user <===>…

Amin Ba
- 1,603
- 1
- 13
- 38
0
votes
0 answers
Rename kong API key name
We want to rename kong apikey name from apikey to api_key, for that we tried
curl -X POST http://localhost:8001/plugins/ \
--data "name=request-transformer" \
--data "config.rename.headers=apikey:api_key"
as described here
We…

Sachith Muhandiram
- 2,819
- 10
- 45
- 94
0
votes
1 answer
How to add client_IP to the response header in Kong apigateway
I'm trying to add "client_ip" in to a response header, but I can see the IP address is being printed on the kong apigateway logs but cannot forward it to a response header,
Sample log…

Madura Dissanayake
- 8,309
- 5
- 25
- 34
0
votes
1 answer
Custom Plugin Configuration in KONG Kubernetes Using Declarative Configuration
I'm using KONG in Kubernetes in DB less mode. I'm trying to add plugins in a declarative way.
Where can I find the config file for Kuberenetes?
How to add the plugins in that file?

Chitraveer Akhil
- 147
- 1
- 5
- 18
0
votes
1 answer
Proxy Caching with Vary Query Params
I am trying to configure caching in KONGA for certain URL with query params.
What I would like to achieve is :
This should be cached -> GET /my-awesome-service/get-something?filter-one=this&filter-two=that
This should be cached differently -> GET…

Raja
- 851
- 9
- 22
0
votes
1 answer
Specify which plugins to use on a route in Kong dbless mode
In dbless mode on kong we can specify which routes to be added on plugin using this declration:
plugins:
- name: jwt
route:
config:
secret_is_base64: false
But I need to specify which plugins this route is going to use with…

Arbaz Siddiqui
- 441
- 2
- 10
0
votes
1 answer
kong cache invalidation throws error : key must be a string
In a custom plugin I need to invalidate a Kong cache entry.
When I use
kong.cache.invalidate_local("thisisastring")
I get error
key must be a string
stack traceback:
[C]: in function 'error'
…

Peter Claes
- 285
- 3
- 9
0
votes
1 answer
Kong Custom Plugin Admin Interface extension : need access to config of plugin
I'm building a custom plugin and I'm extending the admin interface via api.lua
Functions have the 'self' property where i can get request information but I also need access to the plugin configuration (like handler.lua) .
How can I do that ?
Kong…

Peter Claes
- 285
- 3
- 9
0
votes
1 answer
how to connect Kong prometheus plugin to Grafana using docker?
I'm using Kong with KONGA as GUI and added Prometheus plugin for monitoring, however when I try to add the data source to Grafana using Kong endpoint http://host.docker.internal:8001/metrics
I always get the below error
Error reading Prometheus:…

northwest
- 23
- 7
0
votes
1 answer
Error loading Golang and Lua plugins in Kong
I'm trying to install a new instance of Kong, but I'm getting the following error trying to start the service:
stat /tmp/go-plugins/lua_plugin.so: no such file or directory
The installation is supposed to install a plugin built using Golang and a…

blockcipher
- 2,144
- 4
- 22
- 35
0
votes
0 answers
Kong matching routes with same routes in different services
I have two services stored in in kong, both services have the same route name /myRoute.
There are two different clients (A and B) which make requests to two different ports (e.g. port 8080 and 8081) I have the proxy_listen enabled for these two…

lion_bash
- 1,309
- 3
- 15
- 27
0
votes
0 answers
how to preserve kong domain name in ui redirection
I am using kong 2.5 for APIs and Microservice routing and I got a requirement to place react ui application behind kong.so,I have created below service pointing to my UI application.
{host : www.example.com,
protocol : http,
path: /,
port: 80}
I…

Abdul Razak AK
- 405
- 1
- 7
- 17
0
votes
0 answers
Kong's flaky rate limiting behavior
I have deployed some APIs in Azure Kubernetes Service and I have been experimenting with Kong to be able to use some of its features such as rate limiting and IP restriction but it doesn't always work as expected. Here is the plugin objects I…

Mar Chal
- 133
- 3
- 15
0
votes
0 answers
How to apply multiple rate limits for a single service in kong rate limit
I have service and I need to limit the API based on users and organization.
Example : User A and User B belongs same OrgA. Any user can access the API 5 times a day and Organization can access the API 8 times a day.
Service
apiVersion: v1
kind:…

Abdul Razak AK
- 405
- 1
- 7
- 17
0
votes
1 answer
Kong Basic Auth authorizing a route request using authentication from another service
Good Evening,
I've set two two endpoints from different services/routes, they both have authentication via basic-auth with completely different users/pass.
The issue is, i can use any authentications to either of services/routes.
Service1>Route1…

Davi Steewel
- 3
- 2