Huan He
commited on
Commit
•
c2cee53
1
Parent(s):
06382bd
add gzip
Browse files- conf/medviz/default.conf +16 -0
- conf/spinup/default.conf +16 -0
conf/medviz/default.conf
CHANGED
@@ -6,6 +6,22 @@ server {
|
|
6 |
location / {
|
7 |
root /usr/share/nginx/html;
|
8 |
index index.html index.htm;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
# Enable CORS for specific origin and allow credentials
|
11 |
add_header 'Access-Control-Allow-Origin' 'https://medviz.org' always;
|
|
|
6 |
location / {
|
7 |
root /usr/share/nginx/html;
|
8 |
index index.html index.htm;
|
9 |
+
|
10 |
+
# Only serve JSON and TSV files
|
11 |
+
try_files $uri $uri/ =404;
|
12 |
+
|
13 |
+
# Enable gzip compression for JSON and TSV
|
14 |
+
gzip on;
|
15 |
+
gzip_types application/json text/tab-separated-values;
|
16 |
+
gzip_min_length 1000;
|
17 |
+
gzip_vary on;
|
18 |
+
|
19 |
+
# Set correct content type for TSV files
|
20 |
+
default_type application/json;
|
21 |
+
types {
|
22 |
+
application/json json;
|
23 |
+
text/tab-separated-values tsv;
|
24 |
+
}
|
25 |
|
26 |
# Enable CORS for specific origin and allow credentials
|
27 |
add_header 'Access-Control-Allow-Origin' 'https://medviz.org' always;
|
conf/spinup/default.conf
CHANGED
@@ -6,6 +6,22 @@ server {
|
|
6 |
location / {
|
7 |
root /usr/share/nginx/html;
|
8 |
index index.html index.htm;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
# Enable CORS for specific origin and allow credentials
|
11 |
add_header 'Access-Control-Allow-Origin' 'https://spinup-0028ce.spinup.yale.edu' always;
|
|
|
6 |
location / {
|
7 |
root /usr/share/nginx/html;
|
8 |
index index.html index.htm;
|
9 |
+
|
10 |
+
# Only serve JSON and TSV files
|
11 |
+
try_files $uri $uri/ =404;
|
12 |
+
|
13 |
+
# Enable gzip compression for JSON and TSV
|
14 |
+
gzip on;
|
15 |
+
gzip_types application/json text/tab-separated-values;
|
16 |
+
gzip_min_length 1000;
|
17 |
+
gzip_vary on;
|
18 |
+
|
19 |
+
# Set correct content type for TSV files
|
20 |
+
default_type application/json;
|
21 |
+
types {
|
22 |
+
application/json json;
|
23 |
+
text/tab-separated-values tsv;
|
24 |
+
}
|
25 |
|
26 |
# Enable CORS for specific origin and allow credentials
|
27 |
add_header 'Access-Control-Allow-Origin' 'https://spinup-0028ce.spinup.yale.edu' always;
|