webp-express
webp-express copied to clipboard
Do not add the "Header append" code if it is disallowed in the server config
We should not add the "Header append" code if it is disallowed in the server config (ie if "FileInfo" isn't in the AllowOverride list) Why? Well, it will result in 500 internal error on the image requests (or errors in the log, if configured to "NonFatal")
As this can be configured per directory, we should take this into account and - if possible - run the test in the directory of the .htaccess.
If mod_headers simply isn't installed, the system behaves fine (thanks to the "IfModule" directive. So we should actually add the code, when that is the case (as the server setting might change for the better)