-
Notifications
You must be signed in to change notification settings - Fork 0
/
wen.pm.conf
96 lines (75 loc) · 2.84 KB
/
wen.pm.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
94
95
96
# wen.pm
server {
listen 80;
listen [::]:80;
server_name wen.pm;
return 301 https://wen.pm$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name wen.pm;
ssl_certificate /certs/wen.pm/fullchain.pem;
ssl_certificate_key /certs/wen.pm/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
proxy_pass http://127.0.0.1:42005/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 0;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name events.wen.pm;
ssl_certificate /certs/wen.pm/fullchain.pem;
ssl_certificate_key /certs/wen.pm/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
#https://raw.githubusercontent.com/SpectrumPool/wen-events/master/streams.json;
#https://events.wen.pm/streams.json
proxy_pass https://raw.githubusercontent.com/SpectrumPool/wen-events/master/;
add_header Content-Type "application/json";
#Disabled the overprotective access controll since its also being used for dev
#add_header Access-Control-Allow-Origin "https://wen.pm";
add_header Access-Control-Allow-Methods GET;
proxy_cache hermes_cache;
proxy_cache_lock on;
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
add_header X-Hermes-Cache-Status $upstream_cache_status;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name backend.wen.pm;
ssl_certificate /certs/wen.pm/fullchain.pem;
ssl_certificate_key /certs/wen.pm/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
location /social-image/ {
add_header Access-Control-Allow-Origin "https://wen.pm";
add_header Access-Control-Allow-Methods GET;
proxy_ignore_headers X-Accel-Expires Expires Cache-Control Vary;
proxy_cache_key "social-image";
proxy_cache hermes_cache;
proxy_cache_lock on;
proxy_cache_use_stale error updating timeout http_500 http_502 http_503 http_504 http_429;
proxy_cache_valid any 5m;
add_header X-Hermes-Cache-Status $upstream_cache_status;
# Note: We need the resolver since nginx makes ad-hoc resolves when a $var is in the proxy_pass url
resolver 8.8.8.8;
set $fsapi https://process.filestackapi.com/;
set $path AYb91CDjTQTulkqOh4N0Yz/urlscreenshot=mode:window,height:680,width:1080,delay:2000/;
set $targ https://wen.pm/?;
set $url $fsapi$path$targ$msec;
proxy_pass $url;
add_header X-Hermes-Upstream $url;
add_header X-Hermes-Version 1;
}
}