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

feature: Add wolf rbac plugin #1095

Merged
merged 10 commits into from
Feb 6, 2020
Prev Previous commit
Next Next commit
bugfix: modify wolf login url
iGeeky committed Jan 30, 2020
commit 0a80fd7502d677b0aaa1f6f7f975763635a93aae
2 changes: 1 addition & 1 deletion lua/apisix/plugins/wolf-rbac.lua
Original file line number Diff line number Diff line change
@@ -332,7 +332,7 @@ local function login()

core.log.info("consumer: ", core.json.delay_encode(consumer))

local uri = consumer.auth_conf.server .. '/wolf/rbac/login/rest'
local uri = consumer.auth_conf.server .. '/wolf/rbac/login.rest'
local headers = new_headers()
headers["Content-Type"] = "application/json; charset=utf-8"
local timeout = 1000 * 5
2 changes: 1 addition & 1 deletion t/lib/server.lua
Original file line number Diff line number Diff line change
@@ -173,7 +173,7 @@ _M.websocket_handshake_route = _M.websocket_handshake

function _M.go()
local action = string.sub(ngx.var.uri, 2)
action = string.gsub(action, "/", "_")
action = string.gsub(action, "[/\\.]", "_")
if not action or not _M[action] then
return ngx.exit(404)
end