blob: ea818947e8621c71a7bb25802182fa3e70d03698 [file] [log] [blame]
Deepak Kodihallief18a482018-07-30 03:41:43 -05001do_install_append () {
2
3# The webui content is served as pre-compressed gzip content. While nginx can
4# handle this via the gzip_static directive (and we use that), the nginx
5# try_files directive (which we also use) searches the URI as-is. The suggested
6# workaround is to have an empty uncompressed file with the same name as the
7# compressed file. This does not impact the functionality of gzip_static.
8# So for eg if there's an index.html.gz, create an empty index.html. Same goes
9# for all the webui content.
10# https://serverfault.com/questions/571733/nginx-gzip-static-why-are-the-non-compressed-files-required
11# https://www.ruby-forum.com/topic/4402481
12# https://trac.nginx.org/nginx/ticket/1367
13
14find ${D}${datadir}/www -type f -name '*.gz' -exec sh -c 'touch `dirname "$0"`/`basename "$0" .gz`' '{}' \;
15
16}