locao on next
tests(stress) test upstreams up… (compare)
locao on update_upstreams_stress_testing
bungle on bump-healthchecks-2.0.0
Hello, I got a weird problem with http url encoding / decoding.
The browser decode Entrepreneuriat-Collégial
into Entrepreneuriat-Coll%C3%A9gial
and then return 404..
But nginx would work if it would receive Entrepreneuriat-Colle%CC%81gial
.
I found out that e%CC%81 = %CE%A9
(if we do url Decoding)
I'm using like: ngx.escape_uri(ngx.var.url_full)
Hi everyone, I'm adding unit tests to kong via luaunit, in a dockerized kong environment. This is the dockerfile
FROM kong:2.0.3-alpine
USER root
WORKDIR /usr/local
COPY . .
RUN luarocks make *.rockspec
RUN ./run-tests.sh
USER kong
and here's the run-tests script
#!/bin/sh
find . -name "*-test.lua" |
while read -r filename; do
echo "Executing test for: $filename"
/usr/local/openresty/luajit/bin/luajit "$filename"
done
This is how I'm running the individual unit tests. I have added stubs for some dependencies, but the actual code makes use of kong's logging feature kong.log("...")
When I run the tests, it shows that the global kong is a nil value
If i try to fix it via
kong = require("kong")
I get an error:
/usr/local/openresty/luajit/bin/luajit: /usr/local/share/lua/5.1/kong/init.lua:30: lua-resty-core must be loaded; make sure 'lua_load_resty_core' is not disabled.
stack traceback:
[C]: in function 'assert'
/usr/local/share/lua/5.1/kong/init.lua:30: in main chunk
Currently I've added a hack fix for the same - by doing
kong = {}
function kong.log(log_message) print("Kong log: " .. tostring(log_message)) end
But could anyone help out with this?
Hi everyone, I'm adding unit tests to kong via luaunit, in a dockerized kong environment. This is the dockerfile
FROM kong:2.0.3-alpine USER root WORKDIR /usr/local COPY . . RUN luarocks make *.rockspec RUN ./run-tests.sh USER kong
and here's the run-tests script
#!/bin/sh find . -name "*-test.lua" | while read -r filename; do echo "Executing test for: $filename" /usr/local/openresty/luajit/bin/luajit "$filename" done
This is how I'm running the individual unit tests. I have added stubs for some dependencies, but the actual code makes use of kong's logging feature
kong.log("...")
When I run the tests, it shows that the global kong is a nil value
Can anyone please help?
Hey guys! I'm facing an issue with go-lang pointers in configuration type. Here is my config
type Config struct {
NestedKey struct {
ListOfValues []*string `json: "list_of_values,omitempty"`
}
}
func (conf Config) Access(kong *pdk.PDK) {...}
And when I send an HTTP request in order to create a plugin it returns an error like
schema violation (config.nestedkey: {\n list_of_values = \"unknown field\"\n})
Please help me to solve this issue...
Hey guys! I'm facing an issue with go-lang pointers in configuration type. Here is my config
type Config struct { NestedKey struct { ListOfValues []*string `json: "list_of_values,omitempty"` } } func (conf Config) Access(kong *pdk.PDK) {...}
And when I send an HTTP request in order to create a plugin it returns an error like
schema violation (config.nestedkey: {\n list_of_values = \"unknown field\"\n})
Please help me to solve this issue...
I've also the same issue: Kong/kong#6363
KONG_NGINX_MAIN_ENV
. This works for a single variable, but I need to expose multiple. Any idea how I can do that? Thanks in advance.
Good day all I may log an issue but I'd like to check here first, I have a simple go plugin setup and I would like to run db_import command but I always get the following error message whenever the custom plugin is enabled in the plugins env var:
2020/10/06 17:04:24 [verbose] Kong: 2.1.4
Error:
/usr/local/share/lua/5.1/kong/db/dao/plugins/go.lua:42: attempt to index upvalue 'kong' (a nil value)
stack traceback:
/usr/local/share/lua/5.1/kong/db/dao/plugins/go.lua:42: in function 'is_on'
/usr/local/share/lua/5.1/kong/db/schema/plugin_loader.lua:184: in function 'load_subschema'
...are/lua/5.1/kong/db/schema/others/declarative_config.lua:222: in function 'load_plugin_subschemas'
...are/lua/5.1/kong/db/schema/others/declarative_config.lua:234: in function 'load_plugin_subschemas'
...are/lua/5.1/kong/db/schema/others/declarative_config.lua:730: in function 'load'
/usr/local/share/lua/5.1/kong/db/declarative/init.lua:37: in function 'new_config'
/usr/local/share/lua/5.1/kong/cmd/config.lua:82: in function 'cmd_exec'
/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:88>
[C]: in function 'xpcall'
/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:45>
/usr/local/bin/kong:9: in function 'file_gen'
init_worker_by_lua:49: in function <init_worker_by_lua:47>
[C]: in function 'xpcall'
init_worker_by_lua:56: in function <init_worker_by_lua:54>
2020/10/06 17:04:24 [verbose] prefix in use: /usr/local/kong
Has any 1 seen this before?