http – javascript and css files are encoded in nginx – Server Fault
I have a reverse proxy that returns only the javascript and css in some encoding. I do not know if it is encoded or just not decompressed.
This is wat the server returns: ���^style.css��;ks�:��;S��d�y�WMjIB2�3I
this is what I expect: *{margin:0;padding:0}
My html loads in just fine it’s only the css and js files. I already tried turning on/off gzip and brotli. I also tried proxy_set_header Accept '*/*'; but that also did not help.
I can see in the developer tools that the response headers are: Content-encoding: gzip and Content-type: text/css; charset=utf-8. and the request header accept: text/css,*/*;q=0.1
I do see this application/x-javascript; charset=utf-8 as Content-type for the javascripts.
when I directly access the server all files are served correclty. I don’t know what the problem is or where too look at.
Read more here: Source link
