Skip to main content

Rewrite Rule changing compression headers?

Comments

3 comments

  • cPanelLauren
    Hello @jmtakahashi [QUOTE]Are there security features in cPanel or Apache that will strip off Accept-Encoding headers for urls that are processed through a RewriteRule used for versioning static content?
    I am unaware of anything as far a security implementation that would do this. Ultimately this is something that goes beyond our ability to provide assistance for. I would though, like to point you to the forum posts here which might be helpful:
    0
  • jmtakahashi
    Hello @jmtakahashi I am unaware of anything as far a security implementation that would do this. Ultimately this is something that goes beyond our ability to provide assistance for. I would though, like to point you to the forum posts here which might be helpful:

    After days of debugging it turns out that on my live server, running Apache and Cpanel, the RequestHeader for Set-Encoding was being stripped. This was not happening on my Apache setup on my local machine. My web host still has not give me an explanation why this was happening, nor do I know if it has to do with the htaccess file in the pub/static directory, but adding the RequestHeader set below: Header set X-UA-Compatible "IE=edge" Header set Connection keep-alive #THE LINE BELOW THIS COMMENT RequestHeader set Accept-Encoding "gzip, deflate, br" Header unset X-UA-Compatible
    to the htaccess file in the root of my Magento site fixed the issue with the compression. If this is a server issue, I would like someone to comment below on what I might bring up with my webhost to address this. Otherwise, I'm going to submit an issue to the Magento github.
    0
  • cPanelLauren
    Hi @jmtakahashi It's possible this could be in relation to a configuration you host has enabled though I'll leave that up to the rest of the community to speculate. The default configuration of cPanel/WHM doesn't have anything that will do this as far as I am aware. Thanks!
    0

Please sign in to leave a comment.