forked from WeNeedHome/SummaryOfLoanSuspension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proxy.conf
45 lines (35 loc) · 993 Bytes
/
proxy.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
#PROXY-START
index index.php;
autoindex off;
charset UTF-8;
location = / {
rewrite / /README.md;
}
location ~ .*\.(md$) {
fastcgi_pass fastcgi_backend;
fastcgi_read_timeout 600s;
fastcgi_connect_timeout 600s;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ^~ / {
proxy_pass https://raw.githubusercontent.com$request_uri;
proxy_set_header Host raw.githubusercontent.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
set $static_filemVoya4IL 0;
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
{
set $static_filemVoya4IL 1;
expires 12h;
}
if ( $static_filemVoya4IL = 0 )
{
add_header Cache-Control no-cache;
}
}
#PROXY-END