-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update docker image to support manifest mimetype
- Loading branch information
1 parent
08e6cac
commit af33e69
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
user www-data; | ||
worker_processes auto; | ||
pid /run/nginx.pid; | ||
|
||
events { | ||
worker_connections 768; | ||
} | ||
|
||
http { | ||
include mime.types; | ||
types { | ||
application/manifest+json webmanifest; | ||
} | ||
|
||
server { | ||
listen 80; | ||
server_name localhost; | ||
root /var/www/html; | ||
index index.html; | ||
|
||
# Cache control for static assets | ||
location ^~ /assets/ { | ||
add_header Cache-Control "public, max-age=31536000, s-maxage=31536000, immutable"; | ||
try_files $uri =404; | ||
} | ||
|
||
# Cache control for workbox scripts | ||
location ^~ /workbox- { | ||
add_header Cache-Control "public, max-age=31536000, s-maxage=31536000, immutable"; | ||
try_files $uri =404; | ||
} | ||
|
||
# Default location with no caching | ||
location / { | ||
autoindex off; | ||
expires off; | ||
add_header Cache-Control "public, max-age=0, s-maxage=0, must-revalidate" always; | ||
try_files $uri /index.html =404; | ||
} | ||
} | ||
} |