Skip to content

Instantly share code, notes, and snippets.

@leandromoreira
Created April 12, 2020 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leandromoreira/055556e699a38ff4d0106d501e77054d to your computer and use it in GitHub Desktop.
Save leandromoreira/055556e699a38ff4d0106d501e77054d to your computer and use it in GitHub Desktop.
# run this in one tab
docker run --rm -it --name some-redis redis
# run this in another tab
docker exec -it some-redis redis-cli
127.0.0.1:6379> set authentication "access_by_lua_block||if token ~= 'token' then \n return ngx.exit(ngx.HTTP_FORBIDDEN) \n else \n ngx.header['Set-Cookie'] = {'superstition=token'} \n end"
OK
127.0.0.1:6379> get authentication
"access_by_lua_block||if token ~= 'token' then \n return ngx.exit(ngx.HTTP_FORBIDDEN) \n else \n ngx.header['Set-Cookie'] = {'superstition=token'} \n end"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment