Skip to content

Commit a8e1623

Browse files
committed
allow CORS on assets
1 parent b311866 commit a8e1623

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎config/nginx/60_caching.conf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
# Tip: define a global project version and add it
55
# to each asset URL (?v=1.1) as a cachebuster-at-will
66

7-
location ~* \.(jpg|jpeg|png|gif|ico|svg|css|js|woff|woff2|otf)$ {
7+
location ~* \.(jpg|jpeg|png|gif|ico|svg|css|woff|woff2|otf|ttf)$ {
8+
allow all;
9+
expires 365d;
10+
add_header 'Access-Control-Allow-Origin' '*';
11+
}
12+
13+
location ~* \.(js)$ {
814
allow all;
915
expires 365d;
1016
}

0 commit comments

Comments
 (0)