-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.conf
93 lines (85 loc) · 2.78 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/json;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
access_log off;
error_log /dev/null crit;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 128;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
server {
listen 3000 default_server;
listen [::]:3000 default_server;
server_name _;
location ~ ^/injection/(block|protocol|operation)$ {
try_files $uri @whitelisted;
}
location ~ ^/protocols$ {
try_files $uri @whitelisted;
}
location ~ ^/protocols/[0-9a-zA-Z]+$ {
try_files $uri @whitelisted;
}
location ~ ^/chains/[0-9a-zA-Z]+/(chain_id|invalid_blocks|blocks)$ {
try_files $uri @whitelisted;
}
location ~ ^/chains/[0-9a-zA-Z]+/mempool/pending_operations$ {
try_files $uri @whitelisted;
}
location ~ ^/chains/[0-9a-zA-Z]+/invalid_blocks/[0-9a-zA-Z]+$ {
try_files $uri @whitelisted;
}
location ~ ^/chains/[0-9a-zA-Z]+/blocks/[0-9a-zA-Z~]+$ {
try_files $uri @whitelisted;
}
location ~ ^/chains/[0-9a-zA-Z]+/blocks/[0-9a-zA-Z~]+/(hash|live_blocks|metadata)$ {
try_files $uri @whitelisted;
}
location ~ ^/chains/[0-9a-zA-Z]+/blocks/[0-9a-zA-Z~]+/(header|operations|operation_hashes)(.*)$ {
try_files $uri @whitelisted;
}
location ~ ^/chains/[0-9a-zA-Z]+/blocks/[0-9a-zA-Z~]+/helpers/(baking_rights|current_level|endorsing_rights|forge_block_header|levels_in_current_cycle)$ {
try_files $uri @whitelisted;
}
location ~ ^/chains/[0-9a-zA-Z]+/blocks/[0-9a-zA-Z~]+/helpers/(forge|parse|preapply|scripts)/(.*)$ {
try_files $uri @whitelisted;
}
location ~ ^/chains/[0-9a-zA-Z]+/blocks/[0-9a-zA-Z~]+/votes/(.*)$ {
try_files $uri @whitelisted;
}
location ~ ^/chains/[0-9a-zA-Z]+/blocks/[0-9a-zA-Z~]+/context/seed$ {
try_files $uri @whitelisted;
}
location ~ ^/chains/[0-9a-zA-Z]+/blocks/[0-9a-zA-Z~]+/context/contracts/(.*)$ {
try_files $uri @whitelisted;
}
location ~ ^/chains/[0-9a-zA-Z]+/blocks/[0-9a-zA-Z~]+/context/raw/json/(.*)$ {
try_files $uri @whitelisted;
}
location ~ ^/chains/[0-9a-zA-Z]+/blocks/[0-9a-zA-Z~]+/context/(constants|delegates|nonces)(.*)$ {
try_files $uri @whitelisted;
}
location @whitelisted {
add_header Access-Control-Allow-Origin *;
proxy_pass http://localhost:8732 ;
}
}
}