Answer the question
In order to leave comments, you need to log in
What is the catch when trying to use the lua-md5 module in nginx (details under the cut)?
Hello, as a newbie (and even more so lua) in the development environment, I can’t figure out the issue of correctly connecting the lua-md5 module:
ngx.header["Content-Type"] = "text/plain;charset=utf-8";
local cache_key = ngx.var.lua_purge_upstream .. ngx.var.request_uri;
ngx.print(cache_key);
local md5 = require 'md5'
local md5sum = md5.sumhexa(cache_key);
ngx.print(md5sum);
curl: (52) Empty reply from server
ngx.header["Content-Type"] = "text/plain;charset=utf-8";
local cache_key = ngx.var.lua_purge_upstream .. ngx.var.request_uri;
ngx.print(cache_key);
local md5 = ngx.md5
local md5sum = md5(cache_key);
ngx.print(md5sum);
https://centos.pkgs.org/7/epel-x86_64/luarocks-2.3...
luarocks install --server= luarocks.org/manifests/kikito
dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/...
Answer the question
In order to leave comments, you need to log in
The first task was solved by installing:
https://github.com/keplerproject/md5
1) The commands are identical in result
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question