no-permission-demo.conf 387 B

123456789
  1. location = /wolf/rbac/no_permission {
  2. content_by_lua_block {
  3. ngx.status = 200;
  4. ngx.header["Content-Type"] = "application/json; charset=utf-8";
  5. local args, err = ngx.req.get_uri_args()
  6. local reason = args.reason or "unknown reason"
  7. ngx.say(string.format([[ {"ok": false, "reason": "%s"} ]], reason))
  8. }
  9. }