forked from swagger-api/swagger-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
47 lines (35 loc) · 839 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_static on;
gzip_disable "msie6";
gzip_vary on;
gzip_types text/plain text/css application/javascript;
map $request_method $access_control_max_age {
OPTIONS 1728000; # 20 days
}
server_tokens off; # Hide Nginx version
server {
listen 8080;
server_name localhost;
index index.html index.htm;
location / {
absolute_redirect off;
alias /usr/share/nginx/html/;
expires 1d;
location ~* \.(?:json|yml|yaml)$ {
#SWAGGER_ROOT
expires -1;
include cors.conf;
}
include cors.conf;
}
}
}