Created
April 12, 2020 21:10
-
-
Save leandromoreira/407e59ef2cfd6a858326101a45c56896 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" | |
127.0.0.1:6379> sadd coding_units authentication | |
(integer) 1 | |
127.0.0.1:6379> smembers coding_units | |
1) "authentication" | |
127.0.0.1:6379> sadd coding_units anewcomputingunit | |
(integer) 1 | |
127.0.0.1:6379> smembers coding_units | |
1) "authentication" | |
2) "anewcomputingunit" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment