Skip to content

Commit

Permalink
feat(api) deactivate some /server_names endpoints, add specs
Browse files Browse the repository at this point in the history
  • Loading branch information
kikito committed Apr 9, 2018
1 parent 25c7205 commit 6e8a368
Show file tree
Hide file tree
Showing 3 changed files with 163 additions and 126 deletions.
1 change: 1 addition & 0 deletions kong-0.13.0-0.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ build = {
["kong.api.routes.cache"] = "kong/api/routes/cache.lua",
["kong.api.routes.upstreams"] = "kong/api/routes/upstreams.lua",
["kong.api.routes.certificates"] = "kong/api/routes/certificates.lua",
["kong.api.routes.server_names"] = "kong/api/routes/server_names.lua",

["kong.tools.ip"] = "kong/tools/ip.lua",
["kong.tools.ciphers"] = "kong/tools/ciphers.lua",
Expand Down
16 changes: 16 additions & 0 deletions kong/api/routes/server_names.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
local function method_not_allowed(self, db, helpers)
return helpers.responses.send_HTTP_METHOD_NOT_ALLOWED()
end

return {
-- GET / PATCH / DELETE /server_names/server_name are the only methods allowed

["/server_names"] = {
before = method_not_allowed,
},

["/server_names/:server_names/certificate"] = {
before = method_not_allowed,
},

}
Loading

0 comments on commit 6e8a368

Please sign in to comment.