Filter Rails request from Nginx/Lua