Skip to content

Commit 1515d27

Browse files
authored
Merge pull request #54 from eerikson/AddNewFontMimeTypes
Update woff mime-type and define new one for woff2.
2 parents 576f23e + f4364d7 commit 1515d27

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,15 @@ COPY ./container/root /
4141
# NOTE: order of operations is important, new config had to already installed from repo (above)
4242
RUN sed -i "s/listen [0-9]*;/listen ${CONTAINER_PORT};/" $CONF_NGINX_SITE && \
4343
# Make temp directory for .nginx runtime files \
44-
mkdir /tmp/.nginx
44+
mkdir /tmp/.nginx && \
45+
# Next three operations can be completely removed once this ticket is resolved:
46+
# https://trac.nginx.org/nginx/ticket/1243
47+
# Remove older WOFF mime-type
48+
sed -i "/application\/font-woff/d" /etc/nginx/mime.types && \
49+
# Add again with newer mime-type
50+
sed -i "s/}/\n font\/woff woff;&/" /etc/nginx/mime.types && \
51+
# Also add mime-type for WOFF2
52+
sed -i "s/}/\n font\/woff2 woff2;\n&/g" /etc/nginx/mime.types
4553

4654
RUN goss -g /tests/nginx/base.goss.yaml validate && \
4755
/aufs_hack.sh

0 commit comments

Comments
 (0)