road to swarm - add openssl to autoconf, fix api_uri in LUA, fix file rights

This commit is contained in:
bunkerity
2021-03-13 15:28:15 +01:00
parent 3591715f21
commit a2543384cd
9 changed files with 16 additions and 13 deletions

View File

@@ -1,12 +1,11 @@
rewrite_by_lua_block {
local api = require "api"
local api_uri = "%API_URI%"
ngx.var.api_uri = "%API_URI%
if api.is_api_call() then
if api.is_api_call(api_uri) then
ngx.header.content_type = 'text/plain'
if api.do_api_call() then
if api.do_api_call(api_uri) then
ngx.log(ngx.WARN, "[API] API call " .. ngx.var.request_uri .. " successfull from " .. ngx.var.remote_addr)
ngx.say("ok")
else