-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnginx_stream.conf
41 lines (35 loc) · 1.21 KB
/
nginx_stream.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
limit_conn_zone $binary_remote_addr zone=servers:10m;
server {
limit_conn servers 1;
proxy_http_version 1.1;
proxy_set_header Connection "";
server_name api.pushshift.io;
limit_req zone=mylimit burst=2 nodelay;
limit_req_status 429;
gzip on;
gzip_min_length 2k;
gzip_comp_level 6;
gzip_buffers 32 4k;
gzip_types text/event-stream;
server_name stream.pushshift.io;
access_log /var/log/nginx/stream.access.log apm;
location = /favicon.ico {
return 204;
access_log off;
log_not_found off;
}
location / {
add_header X-Accel-Buffering no;
add_header Cache-Control: no-cache;
proxy_read_timeout 60s;
proxy_connect_timeout 60s;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
add_header Access-Control-Allow-Origin *;
proxy_pass http://192.168.1.175:5000;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
}