mirror of
https://github.com/wger-project/wger.git
synced 2026-12-01 02:32:33 +01:00
Set cache control headers for static assets
This commit is contained in:
@@ -31,6 +31,7 @@ RUN apt-get update \
|
||||
# Configure apache
|
||||
ADD wger.conf /etc/apache2/sites-available/
|
||||
RUN a2dissite 000-default.conf \
|
||||
&& a2enmod headers \
|
||||
&& a2ensite wger \
|
||||
&& echo "ServerName localhost" >> /etc/apache2/conf-available/fqdn.conf \
|
||||
&& a2enconf fqdn \
|
||||
|
||||
@@ -13,14 +13,19 @@
|
||||
|
||||
Alias /static/ /home/wger/static/
|
||||
<Directory /home/wger/static>
|
||||
Require all granted
|
||||
Require all granted
|
||||
Header set Cache-Control "max-age=604800, public"
|
||||
</Directory>
|
||||
|
||||
Alias /media/ /home/wger/media/
|
||||
<Directory /home/wger//media>
|
||||
Require all granted
|
||||
<Directory /home/wger/media>
|
||||
Require all granted
|
||||
Header set Cache-Control "max-age=604800, public"
|
||||
</Directory>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/wger-error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/wger-access.log combined
|
||||
</VirtualHost>
|
||||
|
||||
ServerSignature Off
|
||||
ServerTokens Prod
|
||||
|
||||
Reference in New Issue
Block a user