Skip to content

Commit

Permalink
chore(resty) compatible with OpenResty 1.9.7.*
Browse files Browse the repository at this point in the history
ssl_cert_by_lua is only supported in the form of ssl_cert_by_lua_block

This does not yet update the other directives to the newer *by_lua_block
syntax.
  • Loading branch information
thibaultcha committed Feb 5, 2016
1 parent b054711 commit 88e8fdd
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 353 deletions.
16 changes: 0 additions & 16 deletions .ci/setup_openresty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,6 @@ if [ ! "$(ls -A $OPENRESTY_DIR)" ]; then
curl https://openresty.org/download/$OPENRESTY_BASE.tar.gz | tar xz
pushd $OPENRESTY_BASE

# Download and apply nginx patch
pushd bundle/nginx-*
wget https://raw.githubusercontent.com/openresty/lua-nginx-module/ssl-cert-by-lua/patches/nginx-ssl-cert.patch --no-check-certificate
patch -p1 < nginx-ssl-cert.patch
popd

# Download `ssl-cert-by-lua` branch
pushd bundle
wget https://github.com/openresty/lua-nginx-module/archive/ssl-cert-by-lua.tar.gz -O ssl-cert-by-lua.tar.gz --no-check-certificate
tar xzf ssl-cert-by-lua.tar.gz
# Replace `ngx_lua-*` with `ssl-cert-by-lua` branch
NGX_LUA=`ls | grep ngx_lua-*`
rm -rf $NGX_LUA
mv lua-nginx-module-ssl-cert-by-lua $NGX_LUA
popd

./configure \
--prefix=$OPENRESTY_DIR \
--with-luajit=$LUA_DIR \
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
global:
- LUAJIT=2.1
- LUAROCKS=2.3.0
- OPENRESTY=1.9.3.1
- OPENRESTY=1.9.7.2
- CASSANDRA=2.2.4
- OPENSSL=1.0.2f
- SERF=0.7.0
Expand Down
1 change: 0 additions & 1 deletion kong-0.6.1-0.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ build = {

["classic"] = "kong/vendor/classic.lua",
["lapp"] = "kong/vendor/lapp.lua",
["ngx.ssl"] = "kong/vendor/ssl.lua",
["resty_http"] = "kong/vendor/resty_http.lua",

["kong.constants"] = "kong/constants.lua",
Expand Down
5 changes: 3 additions & 2 deletions kong.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ nginx: |
listen {{proxy_listen}};
listen {{proxy_listen_ssl}} ssl;
ssl_certificate_by_lua 'kong.ssl_certificate()';
ssl_certificate_by_lua_block {
kong.ssl_certificate()
}
ssl_certificate {{ssl_cert}};
ssl_certificate_key {{ssl_key}};
Expand All @@ -256,7 +258,6 @@ nginx: |
# Authenticate the user and load the API info
access_by_lua 'kong.access()';
# Proxy the request
# Proxy the request
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down
333 changes: 0 additions & 333 deletions kong/vendor/ssl.lua

This file was deleted.

0 comments on commit 88e8fdd

Please sign in to comment.