Open pashunchik opened 10 months ago
This function is worked for both tengine 3.0.0 and 3.1.0.
Tengine Conf:
Upstream Index.html Add comments to the html and css:
The above comments has been removed from the response by tengine: $ curl -i https://tengine.daily.taobao.net HTTP/2 200 date: Mon, 04 Dec 2023 03:41:51 GMT content-type: text/html vary: Accept-Encoding server: Tengine Ingress/3.0.1 vary: Accept-Encoding via: tengine-site.011159138070.nt12[web,200]
<!DOCTYPE html>
Githubissues.
it is not work after upgrade Tengine. are have old version 3.0
http { trim on;
trim_js on;
trim_css on;
nginx -V Tengine version: Tengine/3.1.0 nginx version: nginx/1.24.0 built by gcc 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) built with OpenSSL 1.1.1q 5 Jul 2022 TLS SNI support enabled configure arguments: --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/sbin/nginx --error-log-path=/var/log/nginx/error.log --with-threads --http-log-path=/var/log/nginx/ --pid-path=/var/run/nginx.pid --http-log-path=/var/log/nginx/access.log --user=www-data --group=www-data --with-cc-opt=-Wno-error --with-http_realip_module --with-stream_realip_module --with-http_geoip_module --with-stream_geoip_module --add-module=modules/ngx_http_reqstat_module --add-module=modules/ngx_http_trim_filter_module --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --add-module=src/http/modules/nginx-module-vts --add-module=src/http/modules/ngx_http_geoip2_module --with-http_perl_module --with-openssl=../openssl-1.1.1q/ --with-openssl-opt=enable-tls1_3 --add-module=src/http/modules/ngx_http_lower_upper_case
E.g.,
Tengine conf:
index.html of upstream with comments:
The comments was removed from the response of upstream by the tengine:
Originally posted by @lianglli in https://github.com/alibaba/tengine/issues/1896#issuecomment-1829999721