mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
added back to top component
This commit is contained in:
1 parent
080e1f36fb
commit
eefd479108
9 files changed
+106
-2
No files matched your search
+41
@@ -0,0 +1,41 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# React/Vue/Vite SPA routing
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Do not aggressively cache index.html.
|
||||
# It references the latest hashed JS/CSS files.
|
||||
location = /index.html {
|
||||
try_files $uri =404;
|
||||
|
||||
add_header Cache-Control "no-cache, must-revalidate";
|
||||
}
|
||||
|
||||
# Vite-generated assets normally contain content hashes.
|
||||
# They can safely be cached for a long time.
|
||||
location ~* \.(?:css|js|mjs|map|png|jpg|jpeg|gif|svg|ico|webp|avif|woff|woff2|ttf|otf)$ {
|
||||
try_files $uri =404;
|
||||
|
||||
expires 30d;
|
||||
add_header Cache-Control "public, max-age=2592000, immutable";
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user