<div dir="ltr"><pre>From: cruze guo <gyb997 at <a href="http://gmail.com">gmail.com</a>>

This patch add support for nginx substitutions.
nginx_substitutions_filter is a filter module which can do both regular
expression and fixed string substitutions on response bodies.<br><a href="https://github.com/yaoweibin/ngx_http_substitutions_filter_module">https://github.com/yaoweibin/ngx_http_substitutions_filter_module</a><br><br>Signed-off-by: cruze guo <gyb997 at <a href="http://gmail.com">gmail.com</a>>
---</pre><br>diff --git a/net/nginx/Config.in b/net/nginx/Config.in<br>index b135e42..de61de9 100644<br>--- a/net/nginx/Config.in<br>+++ b/net/nginx/Config.in<br>@@ -38,6 +38,12 @@ config NGINX_LUA<br>     help<br>         Enable support for LUA scripts.<br> <br>+config NGINX_SUB_MULTIFILTER<br>+    bool<br>+    prompt "Enable SUB_MULTIFILTER module"<br>+    help<br>+        Enable support for ngx_http_substitutions_filter_module.<br>+<br> config NGINX_PCRE<br>     bool<br>     prompt "Enable PCRE library usage"<br>diff --git a/net/nginx/Makefile b/net/nginx/Makefile<br>index e93326e..eb74d24 100644<br>--- a/net/nginx/Makefile<br>+++ b/net/nginx/Makefile<br>@@ -49,7 +49,8 @@ PKG_CONFIG_DEPENDS := \<br>     CONFIG_NGINX_HTTP_LIMIT_REQ \<br>     CONFIG_NGINX_HTTP_EMPTY_GIF \<br>     CONFIG_NGINX_HTTP_BROWSER \<br>-    CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH<br>+    CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH \<br>+    CONFIG_NGINX_SUB_MULTIFILTER<br> <br> include $(INCLUDE_DIR)/<a href="http://package.mk">package.mk</a><br> <br>@@ -100,6 +101,10 @@ endif<br> ifeq ($(CONFIG_NGINX_LUA),y)<br>   ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/lua-nginx<br> endif<br>+ifeq ($(CONFIG_NGINX_SUB_MULTIFILTER),y)<br>+  ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/sub-nginx<br>+endif<br>+<br> ifneq ($(CONFIG_NGINX_HTTP_CACHE),y)<br>   ADDITIONAL_MODULES += --without-http-cache<br> endif<br>@@ -208,6 +213,9 @@ define Package/nginx/install<br>     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nginx $(1)/usr/sbin/<br>     $(INSTALL_DIR) $(1)/etc/nginx<br>     $(INSTALL_DATA) $(addprefix $(PKG_INSTALL_DIR)/etc/nginx/,$(config_files)) $(1)/etc/nginx/<br>+    $(INSTALL_BIN) ./files/bf.lua $(1)/etc/nginx/bf.lua<br>+    $(INSTALL_BIN) ./files/hf.lua $(1)/etc/nginx/hf.lua<br>+    $(INSTALL_BIN) ./files/nginx_wifi.conf $(1)/etc/nginx/nginx.conf<br>     $(INSTALL_DIR) $(1)/etc/init.d<br>     $(INSTALL_BIN) ./files/nginx.init $(1)/etc/init.d/nginx<br> endef<br>@@ -218,6 +226,7 @@ define Build/Prepare<br>     $(if $(CONFIG_NGINX_NAXSI),$(call Prepare/nginx-naxsi))<br>     $(if $(CONFIG_NGINX_SYSLOG),$(call Prepare/nginx-syslog))<br>     $(if $(CONFIG_NGINX_HTTP_UPSTREAM_CHECK),$(call Prepare/nginx-upstream-check))<br>+    $(if $(CONFIG_NGINX_SUB_MULTIFILTER),$(call Prepare/sub-nginx))<br> endef<br> <br> define Download/lua-nginx<br>@@ -228,12 +237,26 @@ define Download/lua-nginx<br>     PROTO:=git<br> endef<br> <br>+define Download/sub-nginx<br>+    VERSION:=131c030cbb284c7eb22a1c5184236d0983391441<br>+    SUBDIR:=sub-nginx<br>+    FILE:=sub-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz<br>+    URL:=<a href="https://github.com/yaoweibin/ngx_http_substitutions_filter_module.git">https://github.com/yaoweibin/ngx_http_substitutions_filter_module.git</a><br>+    PROTO:=git<br>+endef<br>+<br> define  Prepare/lua-nginx<br>     $(eval $(call Download,lua-nginx))<br>     gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)<br>     $(call PatchDir,$(PKG_BUILD_DIR),./patches-lua-nginx)<br> endef<br> <br>+define  Prepare/sub-nginx<br>+    $(eval $(call Download,sub-nginx))<br>+    gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)<br>+endef<br>+<br>+<br> define Download/nginx-upstream-check<br>     VERSION:=d40b9f956d9d978005bb15616d2f283d4e3d2031<br>     SUBDIR:=nginx-upstream-check<br></div>