Welcome! Log In Create A New Profile

Advanced

ответ сервер gunzip игнорирование

July 11, 2022 11:10AM
Пытаюсь gunzip внешний сервер что бы провести замену
вот часть моего конфига:

```
location ~ /path/to/(?<mark>[A-Z0-9]+) {
gunzip on;
proxy_ssl_server_name on;
#proxy_set_header accept-encoding ",";
proxy_set_header Accept-Encoding "";
proxy_pass https://$http_host;
set $code 'Hello $mark';
sub_filter '<div class="secret-class">' '<div class="secret-class">$code';
sub_filter_last_modified on;
sub_filter_once on;
keepalive_timeout 0;
}
```
с включенной отладкой не вижу что gunzip участвует в обработке
подозреваю что это связано с `Transfer-Encoding: chunked`
вот реальные заголовки ответа из дебага
```
2022/07/08 17:11:23 [debug] 905#905: *1 HTTP/1.1 200 OK^M
Server: nginx/1.18.0 (Ubuntu)^M
Date: Fri, 08 Jul 2022 17:11:23 GMT^M
Content-Type: text/html;charset=UTF-8^M
Transfer-Encoding: chunked^M
Connection: close^M
x-amz-rid: YWZ57AJXZBYB0FG289ZP^M
Content-Encoding: gzip^M
Accept-CH: ect,rtt,downlink,device-memory,sec-ch-device-memory,viewport-width,sec-ch-viewport-width,dpr,sec-ch-dpr^M
Accept-CH-Lifetime: 86400^M
Cache-Control: no-cache, no-transform^M
P3P: policyref="https://www.amazon.com/w3c/p3p.xml",CP="CAO DSP LAW CUR ADM IVAo IVDo CONo OTPo OUR DELi PUBi OTRi BUS PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA HEA PRE LOC GOV OTC "^M
X-XSS-Protection: 1;^M
X-Content-Type-Options: nosniff^M
content-security-policy-report-only: default-src 'self' blob: https: data: mediastream: 'unsafe-eval' 'unsafe-inline';report-uri https://metrics.media-amazon.com/^M
Strict-Transport-Security: max-age=47474747; includeSubDomains; preload^M
Vary: Content-Type,Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent^M
X-Frame-Options: SAMEORIGIN^M
Permissions-Policy: interest-cohort=()^M
X-Cache: Miss from cloudfront^M
Via: 1.1 b8d025b20dd973defd450601f0b4ae40.cloudfront.net (CloudFront)^M
X-Amz-Cf-Pop: YTO50-C1^M
X-Amz-Cf-Id: SpR4NSd4oee_n1EGMR2qsYjOJUajz5JCCmne1VQAPbtIQfIr5TOQVQ==^M
```
пожалуйста помогите понять что я делаю не так

```
roman@macmini:~$ nginx -V
nginx version: nginx/1.18.0 (Ubuntu)
built with OpenSSL 1.1.1f 31 Mar 2020
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-7KvRN5/nginx-1.18.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-compat --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_xslt_module=dynamic --with-stream=dynamic --with-stream_ssl_module --with-mail=dynamic --with-mail_ssl_module
roman@macmini:~$
```
Subject Author Posted

ответ сервер gunzip игнорирование

theromis1 July 11, 2022 11:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 111
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready