[mythtv-commits] Ticket #13366: Mythweb - Safely implement recommended best practices
MythTV
noreply at mythtv.org
Mon Dec 31 02:05:53 UTC 2018
#13366: Mythweb - Safely implement recommended best practices
----------------------------------+---------------------------------
Reporter: Gary Buhrmaster | Owner: Stuart Auchterlonie
Type: Patch - Feature | Status: new
Priority: minor | Milestone: needs_triage
Component: Plugin - MythWeb | Version: Unspecified
Severity: medium | Keywords:
Ticket locked: 0 |
----------------------------------+---------------------------------
Reviewing some old stashes, I found this one. It may be of interest to
the mythweb users. It tries to implement the recommended configurations
using safe definitions in the default apache config. Caveat emptor.
{{{
diff --git a/mythweb.conf.apache b/mythweb.conf.apache
index cc81c3ff..c5da6061 100644
--- a/mythweb.conf.apache
+++ b/mythweb.conf.apache
@@ -212,6 +212,16 @@
# AddOutputFilterByType DEFLATE text/css
# AddOutputFilterByType DEFLATE application/x-javascript
+ # if we can auto-detect the deflate module, use it
+ <IfModule deflate_module>
+ BrowserMatch ^Mozilla/4 gzip-only-text/html
+ BrowserMatch ^Mozilla/4\.0[678] no-gzip
+ BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
+ AddOutputFilterByType DEFLATE text/html
+ AddOutputFilterByType DEFLATE text/css
+ AddOutputFilterByType DEFLATE application/x-javascript
+ </IfModule>
+
# This is helpful for mod_deflate -- it prevents proxies from
changing
# the user agent to/from this server, which can prevent compression
from
# being enabled. It is disabled here because many distros seem not
to
@@ -219,6 +229,11 @@
#
# Header append Vary User-Agent env=!dont-vary
+ # If we can auto-detect the headers module, use it
+ <IfModule headers_module>
+ Header append Vary User-Agent env=!dont-vary
+ </IfModule>
+
# Set up the perl handler so we can stream properly. Do not use
mod_perl
# because it has a tendency to hold onto child processes, which
causes
# problems if the browser closes on an in-progress stream.
}}}
--
Ticket URL: <https://code.mythtv.org/trac/ticket/13366>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list