-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproxy.template
41 lines (33 loc) · 993 Bytes
/
proxy.template
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
upstream gs {
server storage.googleapis.com;
keepalive 100;
}
server {
listen 80 default_server;
server_name _;
# Limit Request Methods to GET|HEAD|PURGE
if ( $request_method !~ "GET|HEAD|PURGE" ) {
return 405;
}
# Disable IPv6 lookups.
resolver ${NAMESERVER} ipv6=off;
# Dummy health check.
location = /healthz {
return 200 'OK';
}
# Proxy to index.html for the landing page.
location = / {
proxy_set_header Host storage.googleapis.com;
proxy_http_version 1.1;
proxy_pass_header Date;
proxy_pass_header Server;
proxy_pass http://gs/${BUCKET}/index.html;
}
location / {
proxy_set_header Host storage.googleapis.com;
proxy_http_version 1.1;
proxy_pass_header Date;
proxy_pass_header Server;
proxy_pass http://gs/${BUCKET}$uri;
}
}