access.lua ��e �U �j] �U - certain endpoints are always blocked if nginx_uri == "/_access_token" or nginx_uri == "/_me" then ngx.exit(403) end -- import requirements local cjson = require "cjson" -- setup some app-level vars local app_id = "APP_ID" local app_secret = "APP_SECRET" local args = ngx.req.get_uri_args() if args.error and args.error == "access_denied" then ngx.status = ngx.HTTP_UNAUTHOR
![Simple lua file enabling oauth support for nginx via nginx-lua and access_by_lua.](https://cdn-ak-scissors.b.st-hatena.com/image/square/1ef26f6cb4349557952890dbe3e567f7f98dc151/height=288;version=1;width=512/https%3A%2F%2Fgithub.githubassets.com%2Fassets%2Fgist-og-image-54fd7dc0713e.png)