Skip to content

Commit

Permalink
Re-introduce GZIP fix
Browse files Browse the repository at this point in the history
  • Loading branch information
surma committed Oct 3, 2017
1 parent 73cc203 commit 50568c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Dockerfile
Expand Up @@ -14,6 +14,17 @@ FROM wordpress:4.8-php7.0-apache
RUN echo "<? if (\$_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') { \$_SERVER['HTTPS'] = 'on'; } ?>" >> /tmp/file && \
cat /usr/src/wordpress/wp-config-sample.php >> /tmp/file && \
cp /tmp/file /usr/src/wordpress/wp-config-sample.php
# Gotta fix GZIP, too >.>
RUN sed -i 's|</VirtualHost>||' /etc/apache2/sites-enabled/000-default.conf && \
echo " # Set no-cache as default caching strategy to avoid heuristics stupidity" >> /etc/apache2/sites-enabled/000-default.conf && \
echo " Header setIfEmpty Cache-Control \"public, no-cache\"" >> /etc/apache2/sites-enabled/000-default.conf && \
echo " # Fix etags w/ mod_deflate >.>" >> /etc/apache2/sites-enabled/000-default.conf && \
echo " Header edit \"ETag\" \"^(.*)-gzip(\\\"?)$\" \"\$1\$2\"" >> /etc/apache2/sites-enabled/000-default.conf && \
echo " RequestHeader unset If-Modified-Since" >> /etc/apache2/sites-enabled/000-default.conf && \
echo "</VirtualHost>" >> /etc/apache2/sites-enabled/000-default.conf && \
echo "" >> /etc/apache2/sites-enabled/000-default.conf && \
ln -sf /etc/apache2/mods-available/headers.* /etc/apache2/mods-enabled/

COPY dist/theme /var/www/html/wp-content/themes/surmblog
RUN mkdir /var/www/html/wp-content/themes/surmblog_dev
COPY dist/pwp-lazy-image-plugin /var/www/html/wp-content/plugins/pwp-lazy-image
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "ProgressiveWordPress",
"version": "0.0.3349",
"version": "0.0.3351",
"description": "A Sample WordPress-based Progressive Web App.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 50568c9

Please sign in to comment.