Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
ElvinEfendi committed Apr 4, 2019
1 parent 9728105 commit 041b354
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
8 changes: 0 additions & 8 deletions rootfs/etc/nginx/lua/plugins/hello_world/handler.lua

This file was deleted.

15 changes: 15 additions & 0 deletions rootfs/etc/nginx/lua/plugins/hello_world/main.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
local _M = {}

function _M.rewrite()
ngx.req.set_header("x-hello-world", "1")
end

function _M.access()
local ua = ngx.var.http_user_agent

if ua == "hello" then
ngx.exit(403)
end
end

return _M

0 comments on commit 041b354

Please sign in to comment.