njs-examples icon indicating copy to clipboard operation
njs-examples copied to clipboard

js_body_filter & sendBuffer source change

Open tzukav opened this issue 2 years ago • 1 comments

Hello, is there any way to use js_body_filter and sendBuffer to remove some chars from the source? Nginx is waiting for the same content length, if the content length is changed(removed something), the page is keep loading without stopping. One workaround I got is to replace those characters with a space, to get same content length. Is there another workaround ? Preferably without js_content. Thanks.

tzukav avatar Oct 10 '22 16:10 tzukav

Hi @tzukav,

You also have to set or drop Content-Length altogether.

xeioex avatar Oct 10 '22 23:10 xeioex