-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: simplifying nginx frontend service + add caching (#18)
* simplifying nginx frontend service + add caching (#18)
- Loading branch information
Showing
4 changed files
with
37 additions
and
46 deletions.
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
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,34 @@ | ||
server { | ||
listen 8080 default_server; | ||
server_name _; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
|
||
location /maelstro { | ||
alias /app; | ||
index index.html; | ||
try_files $uri $uri/ /index.html; | ||
autoindex off; | ||
expires off; | ||
add_header Cache-Control "public, max-age=0, s-maxage=0, must-revalidate" always; | ||
} | ||
|
||
# all assets contain hash in filename, cache forever | ||
location ^~ /assets/ { | ||
alias /app; | ||
add_header Cache-Control "public, max-age=31536000, s-maxage=31536000, immutable"; | ||
try_files $uri =404; | ||
} | ||
|
||
# all workbox scripts are compiled with hash in filename, cache forever | ||
location ^~ /workbox- { | ||
alias /app; | ||
add_header Cache-Control "public, max-age=31536000, s-maxage=31536000, immutable"; | ||
try_files $uri =404; | ||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.