jeelabs / esp-link

esp8266 wifi-serial bridge, outbound TCP, and arduino/AVR/LPC/NXP programmer
Other
2.82k stars 720 forks source link

Using nginx reverse proxy, getting "Your browser does not accept gzip-compressed data." #396

Closed ultratoto14 closed 5 years ago

ultratoto14 commented 5 years ago

I used nginx to enhance the security of all my home services that i can access remotely. I just added a link to my esp-link (esp-link v3.0.14-g963ffbb)

When trying to connect, nothing is displayed despite: "Your browser does not accept gzip-compressed data."

nginx version: nginx/1.13.5

...

# Gzip Settings
##

    gzip on;
gzip_disable "msie6";

gzip_vary on;
gzip_min_length 1048;
gzip_proxied any;
gzip_comp_level 2;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types document text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

...

... location / { proxy_set_header Authorization $ssl_client_s_dn; proxy_hide_header Authorization; proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_request_headers on; proxy_pass http://192.168.1.12/; } ...

ultratoto14 commented 5 years ago

Found myself a fix. add proxy_set_header Accept-Encoding gzip,deflate; In the location to transfer the gzip to the esp.

Maybe linked to the fact that esp-link use http 1.0 where gzip has been added to http 1.1