Skip to content

Commit 61f3eef

Browse files
committed
fix: serve static assets from dist folder only
1 parent 2fe84d5 commit 61f3eef

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

config/nginx.conf

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,10 @@ http {
7070
access_log off;
7171
}
7272

73-
# assets, media
74-
location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ {
75-
expires 7d;
76-
access_log off;
77-
}
78-
79-
# svg, fonts
80-
location ~* \.(?:svgz?|ttf|ttc|otf|eot|woff2?)$ {
81-
add_header Access-Control-Allow-Origin "*";
82-
expires 7d;
83-
access_log off;
84-
}
73+
location ^~ /dist/ {
74+
expires 7d;
75+
access_log off;
76+
}
8577

8678
# Enable gzip compression
8779
gzip on;

0 commit comments

Comments
 (0)