haproxytech / haproxy-lua-http

Simple Lua HTTP helper && client for use with HAProxy.
Apache License 2.0
56 stars 23 forks source link

How to use lua-prepend-path? #9

Closed shadow7412 closed 3 years ago

shadow7412 commented 4 years ago

I'd really appreciate an example on the page. Instead of just mentioning this in passing, could you give a quick example of the line that should be added to haproxy.conf?

And for those running an older version - what is the alternative?

TimWolla commented 4 years ago

I'd really appreciate an example on the page. Instead of just mentioning this in passing, could you give a quick example of the line that should be added to haproxy.conf?

This is explained in the HAProxy documentation in detail: https://cbonte.github.io/haproxy-dconv/2.2/configuration.html#3.1-lua-prepend-path

And for those running an older version - what is the alternative?

Putting the library into the default Lua path or messing around with package.path within your script before requireing the library.