Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(router) new API router with multiple hosts/paths and HTTP methods support #1970

Merged
merged 39 commits into from
Jan 12, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ded0eb8
feat(router) new routing module
thibaultcha Nov 3, 2016
5307730
feat(schemas) update APIs schema to support hosts/uris/methods
thibaultcha Nov 18, 2016
0c3878d
tests(router) convert Admin API tests to new APIs schemas
thibaultcha Nov 21, 2016
9b9ed4c
feat(router) add postgres migrations for new router
thibaultcha Nov 21, 2016
2ad86c2
chore(router) add new router to rockspec
thibaultcha Nov 21, 2016
1acdd4b
fix(router) correctly set grab_headers + don't caetgorize if array is
thibaultcha Nov 22, 2016
5d03eac
tests(router) add a test for 'exec()' return values
thibaultcha Nov 22, 2016
5ccf4f3
feat(router) integrate new router into Kong runtime
thibaultcha Nov 22, 2016
d82f08a
fix(migrations) add safeguards to router migrations
thibaultcha Nov 22, 2016
8a1141c
feat(router) debug_kong req header + more tests for catch-all root URI
thibaultcha Nov 22, 2016
e1f85ab
feat(router) rename strip_request_path, update DAO/Admin API tests
thibaultcha Nov 28, 2016
33e5df1
fix(router) sort uris-routed APIs by URI length
thibaultcha Nov 28, 2016
1f58f6a
feat(router) check APIs required properties in self_check
thibaultcha Nov 28, 2016
cee77ea
tests(integration) initial router tests + remove old "resolver" tests
thibaultcha Nov 29, 2016
ef1c280
fix(tests) provide a name for a router test (CI busted is crashing on
thibaultcha Nov 29, 2016
99bb0d2
tests(dao) fix DAO schema test due to new router
thibaultcha Dec 1, 2016
5d9b4f7
fix(router) strip URI when plain match occur
thibaultcha Dec 1, 2016
8281775
tests(router) invalidation and upstream_url parsing tests
thibaultcha Dec 1, 2016
383f5d1
refactor(router) re-work router to be easier to maintain
thibaultcha Dec 2, 2016
9b673ba
feat(router) implement an LRU cache
thibaultcha Dec 2, 2016
8b829fd
optimize(router) scoping, tweaks and comments
thibaultcha Dec 2, 2016
b8042fa
tests(router) fixes and tweaks
thibaultcha Dec 3, 2016
9b84644
tests(plugins) convert plugins test to the new router
thibaultcha Dec 3, 2016
9a14c12
fix(tests) run migrations from spec helpers
thibaultcha Dec 5, 2016
ea084ad
feat(ssl) move SSL certificates and SNIs in core
thibaultcha Dec 20, 2016
a79865b
feat(ssl) implement https_only and accept_if_terminated properties on
thibaultcha Dec 21, 2016
80452bd
chore: remove old SSL plugin, lrucache and add missing modules to roc…
thibaultcha Dec 21, 2016
9e7a9f2
feat(ssl) use a key from database_cahce (sigh)
thibaultcha Dec 21, 2016
7042292
chore: remove old resolver code and tests
thibaultcha Dec 21, 2016
5351d5c
fix: remove ssl plugin from plugins list
thibaultcha Dec 21, 2016
ecd7621
tests(hooks) fixing hooks tests
subnetmarco Dec 23, 2016
a349fdf
feat(proxy) support for websockets
subnetmarco Nov 17, 2016
8e961d6
fix(oauth2) ownership check
subnetmarco Dec 28, 2016
2f87c3c
feat(core) upstreams (#1735)
Tieske Dec 28, 2016
b9fcd44
more fixes
subnetmarco Jan 3, 2017
3365b90
fixes #1944
Tieske Jan 6, 2017
9e1c27c
tests(proxy) fix entities being inserted withotu trigerring cache
thibaultcha Jan 11, 2017
73bfaf1
feat(router) create router in init phase for early error detection
thibaultcha Jan 11, 2017
b2db9e8
tests(router) some fixes due to bad merging/rebasing
thibaultcha Jan 12, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tests(integration) initial router tests + remove old "resolver" tests
Also disable tests relying on 'ALL_APIS_BY_DICT' cache
  • Loading branch information
thibaultcha committed Jan 12, 2017
commit cee77ea9bbc66a99bb66ef08bc5fa61cfd8bd8eb
4 changes: 3 additions & 1 deletion kong/core/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ local function build_router()
for i = 1, #apis do
-- alias since the router expects 'headers'
-- as a map
apis[i].headers = { host = apis[i].hosts }
if apis[i].hosts then
apis[i].headers = { host = apis[i].hosts }
end
end

router, err = Router.new(apis)
Expand Down
10 changes: 5 additions & 5 deletions spec/02-integration/03-admin_api/05-cache_routes_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local current_cache
local caches = { "lua", "shm" }
local function do_it(desc, func)
for _, cache in ipairs(caches) do
it("[cache="..cache.."] "..desc,
it("[cache="..cache.."] "..desc,
function(...)
current_cache = cache
return func(...)
Expand All @@ -33,7 +33,7 @@ describe("Admin API", function()
setup(function()
assert(helpers.dao.apis:insert {
name = "api-cache",
request_host = "cache.com",
hosts = { "cache.com" },
upstream_url = "http://mockbin.com"
})
end)
Expand All @@ -47,7 +47,7 @@ describe("Admin API", function()
})
assert.response(res).has.status(404)
end)
do_it("retrieves a cached entity", function()
pending("retrieves a cached entity", function()
-- populate cache
local res = assert(proxy_client:send {
method = "GET",
Expand All @@ -73,7 +73,7 @@ describe("Admin API", function()
end)

describe("DELETE", function()
do_it("purges cached entity", function()
pending("purges cached entity", function()
-- populate cache
local res = assert(proxy_client:send {
method = "GET",
Expand Down Expand Up @@ -109,7 +109,7 @@ describe("Admin API", function()

describe("/cache/", function()
describe("DELETE", function()
do_it("purges all entities", function()
pending("purges all entities", function()
-- populate cache
local res = assert(proxy_client:send {
method = "GET",
Expand Down
Loading