Skip to content

Commit b5cc7ca

Browse files
committed
update regions, add --http2 to curl example
Signed-off-by: Ahmet Alp Balkan <[email protected]>
1 parent 94ee4b4 commit b5cc7ca

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

example/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ func curl(w http.ResponseWriter, req *http.Request) {
105105

106106
w.Header().Set("content-type", "text/plain; charset=UTF-8")
107107

108-
fmt.Fprintf(w, "$ curl -sSLv %s\n\n", url)
109-
cmd := exec.Command("curl", "-sSLv", url)
108+
fmt.Fprintf(w, "$ curl -sSLv --http2 %s\n\n", url)
109+
cmd := exec.Command("curl", "-sSLv", "--http2", url)
110110
cmd.Stdout = w
111111
cmd.Stderr = w
112112
if err := cmd.Run(); err != nil {

runsd/proxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (rp *reverseProxy) newReverseProxyHandler(tr http.RoundTripper) http.Handle
5353
transport := loggingTransport{next: tokenInject}
5454

5555
return &httputil.ReverseProxy{
56-
Transport: transport,
56+
Transport: transport,
5757
FlushInterval: -1, // to support grpc streaming responses
5858
Director: func(req *http.Request) {
5959
klog.V(5).Infof("[director] receive req host=%s", req.Host)

runsd/regions.go

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,19 @@ import (
2424
var (
2525
// TODO needs updating
2626
cloudRunRegionCodes = map[string]string{
27-
"asia-east1": "de",
28-
"asia-northeast1": "an",
29-
"europe-north1": "lz",
30-
"europe-west1": "ew",
31-
"europe-west4": "ez",
32-
"us-central1": "uc",
33-
"us-east1": "ue",
34-
"us-east4": "uk",
35-
"us-west1": "uw",
27+
"asia-east1": "de",
28+
"asia-northeast1": "an",
29+
"asia-northeast2": "dt",
30+
"asia-southeast1": "as",
31+
"australia-southeast1": "ts",
32+
"europe-north1": "lz",
33+
"europe-west1": "ew",
34+
"europe-west4": "ez",
35+
"northamerica-northeast1": "nn",
36+
"us-central1": "uc",
37+
"us-east1": "ue",
38+
"us-east4": "uk",
39+
"us-west1": "uw",
3640
}
3741
)
3842

0 commit comments

Comments
 (0)