-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Content Encoding Warning #999
Comments
Hey @vpfaulkner, Just wanted to let you know that we are looking at this internally. I'll provide more info when we determine why this doesn't appear to work as expected. |
thanks @bollain. Let me know if there is anything else I can do. |
hey @vpfaulkner, sorry for the delay on this one. We had a look internally and mapped the error you are seeing to the unminified source code. This error gets thrown when the compressed size of the brotli is less than what we expect to be the maximum compressed size. So potentially we think the file is getting compressed twice, one by us, and once by the server. We have this guide on how to setup content-encoding in common server setups: Let me know if you get a chance to go over it. |
When will the nginx sample file get added to that repo? |
Hi @gintechsystems, Please reach out via our support system for further guidance on Nginx: |
Dear @bollain, we have warning message and want to fix in nginx. Is there an official documentation now for nginx, or do we also have to contact the support? Greetings |
Hi @4kochi, To correctly set the response header for files that are compressed using Brotli in Nginx, you need to configure Nginx to recognize and serve Brotli compressed files. This involves setting the Content-Encoding header correctly and configuring Nginx to serve the pre-compressed Brotli files. First ensure you have the Brotli configuration to your Nginx configuration file. For example:
More reference on the NGINX headers module here This is of course a very basic example and intended only to get you started. Running this on my end on a simple app I no longer see the warnings for content encoding, but you will need to tweak this to your configuration and ensure everything works as expected. If you need further guidance please don't hesitate to post here or send a ticket via our support channel. |
WebViewer version
8.10.0
The current behavior
We get this console warning:
webviewer-core.min.js:215 There may be some degradation of performance. Your server has not been configured to serve .gz. and .br. files with the expected Content-Encoding. See http://www.pdftron.com/kb_content_encoding for instructions on how to resolve this.
However, from what I can tell, the
Content-Encoding
header is being set tobr
Also, if I set a Chrome debugger to the line that throws that warning and look at the response, it includes the expected header:
The expected behavior
No warning
Steps to reproduce
Not sure best way for you to reproduce this.
The text was updated successfully, but these errors were encountered: