2808 explained code solutions for 75 technologies


nginx-luaBase64 decode in Lua


server {
  location / {
    content_by_lua_block {
      local enc = ngx.decode_base64('dmFsdWU=')
      ngx.say(enc)
    }
  }
}ctrl + c
content_by_lua_block

nginx-lua module directive to specify block of Lua code

ngx.decode_base64

decode given value from base64

dmFsdWU=

sample base64-encoded value to decode

ngx.say

output given text to client