Add Brotli Support for NGINX in ESP#784
Conversation
|
Please rebase your code |
|
What is your plan of adding Brotli compression related config to ESP nginx config? Do you plan to add some start_esp flags for them? Or you plan to use your own custom nginx config? |
|
We have integration tests written in perl. They are all in src/nginx/t folder. Could you also add an integration test for this feature. You can follow this test |
| "@nginx//:core", | ||
| "@nginx//:http", | ||
| "@ngx_brotli//:http_brotli_filter", | ||
| "@ngx_brotli//:http_brotli_static", |
There was a problem hiding this comment.
do we need static? Here is what the doc say
ngx_brotli is a set of two nginx modules:
ngx_brotli filter module - used to compress responses on-the-fly,
ngx_brotli static module - used to serve pre-compressed files.
Do we need o support serve static compressed files. ESP is just a proxy.
There was a problem hiding this comment.
I think I can see your point, but that I was assuming the functionality here is similar to gzip and gzip_static. The latter which appears to be enabled in the nginx_esp binary.. (--with-http_gzip_static_module)
We will be using our own nginx.conf that includes the brotli directives. |
|
LGTM. I will trigger a presubmit test. |
Brotli compression is not currently supported in ESP, however the latest version of NGINX found here indicates that adding a brotli flag to the nginx_repositories function will allow the associated brotli dependencies to be added to ESP. The bazel build of nginx already supports Brotli, all we have to do is just add the flag on the ESP-side.