Skip to content

Instantly share code, notes, and snippets.

@leandromoreira
Last active April 12, 2020 13:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save leandromoreira/ea09bff50609d4c9363b139383424933 to your computer and use it in GitHub Desktop.
local headers = ngx.req.get_headers()
if not string.find(headers["Referer"],"localhost") then
return ngx.exit(ngx.HTTP_FORBIDDEN)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment