From b54d47968bae7cee15bcc8df4457bd8c608ff4ea Mon Sep 17 00:00:00 2001 From: owl Date: Thu, 18 Jan 2024 20:01:07 +0800 Subject: [PATCH] feat(core): add ngx_brotli module --- build/openresty/BUILD.openresty.bazel | 2 ++ build/openresty/repositories.bzl | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/build/openresty/BUILD.openresty.bazel b/build/openresty/BUILD.openresty.bazel index ae79fb93867..1dd2b0f476b 100644 --- a/build/openresty/BUILD.openresty.bazel +++ b/build/openresty/BUILD.openresty.bazel @@ -168,6 +168,7 @@ CONFIGURE_OPTIONS = [ "--add-module=$$EXT_BUILD_ROOT$$/external/lua-kong-nginx-module/stream", "--add-module=$$EXT_BUILD_ROOT$$/external/lua-resty-lmdb", "--add-module=$$EXT_BUILD_ROOT$$/external/lua-resty-events", + "--add-module=$$EXT_BUILD_ROOT$$/external/ngx_brotli", ] + select({ "@kong//:aarch64-linux-anylibc-cross": [ "--crossbuild=Linux:aarch64", @@ -261,6 +262,7 @@ configure_make( "@lua-resty-lmdb//:all_srcs", "@lua-resty-events//:all_srcs", "@openresty_binding//:all_srcs", + "@ngx_brotli//:all_srcs", ] + select({ "@kong//:wasmx_flag": [ "@ngx_wasm_module//:all_srcs", diff --git a/build/openresty/repositories.bzl b/build/openresty/repositories.bzl index b493dd246fb..98e40eb491a 100644 --- a/build/openresty/repositories.bzl +++ b/build/openresty/repositories.bzl @@ -69,6 +69,15 @@ def openresty_repositories(): recursive_init_submodules = True, ) + maybe( + new_git_repository, + name = "ngx_brotli", + branch = KONG_VAR["NGX_BROTLI"], + remote = "https://github.com/google/ngx_brotli", + build_file_content = _NGINX_MODULE_DUMMY_FILE, + recursive_init_submodules = True, + ) + def _openresty_binding_impl(ctx): ctx.file("BUILD.bazel", _NGINX_MODULE_DUMMY_FILE) ctx.file("WORKSPACE", "workspace(name = \"openresty_patch\")")