Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4714

Haproxy 2.0 not support 1.9x lua?

$
0
0

@fsfs wrote:

this is work in 1.9.x
acl api_check path_beg -i “/check”
#http-request lua.check_quth if api_check

#lua
---------check_req
core.register_action(“api_check_req”, { “http-req” }, function(applet)
local msg = ‘{“status”:1,“message”:“Could not authenticate you.”}’
applet.res:send(‘HTTP/1.0 200 OK\r\nContent-Type: application/json\r\nConnection: close\r\n\r\n’…msg)
applet:done()
end)

#error
[ALERT] 323/163943 (1236) : Lua function ‘api_check_req’: runtime error: 0 from [C] method ‘set’, /root/hap/api.lua:762 C function line 756.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4714

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>