File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ # GET url
2+ {{ $GETendpoints := list
3+
4+ }}
5+
6+ # POST url
7+ {{ $POSTendpoints := list
8+ " /oss/iam_proxy/buckets_access_keys"
9+ }}
10+
11+ # PUT url
12+ {{ $PUTendpoints := list
13+
14+ }}
15+
16+ # PATCH url
17+ {{ $PATCHendpoints := list
18+
19+ }}
20+
21+ # DELETE url
22+ {{ $DELETEendpoints := list
23+ " /oss/iam_proxy/users/"
24+ }}
25+
26+ {{define "route"}}
27+ {{ .Prefix | replace "/" "." | replace "_" "#" }}-{{ .Method | lower }}:
28+ entryPoints :
29+ - " proxy"
30+ rule : " Host(`{{ default " FQDN_not_configured" (env "FQDN") }}`) && PathPrefix(`{{.Prefix}}`) && Method(`{{.Method}}`)"
31+ service : nutanix-pc
32+ tls : {}
33+ {{end}}
34+
35+ http :
36+ routers :
37+ {{range $prefix := $GETendpoints}}
38+ {{ template "route" dict "Prefix" $prefix "Method" "GET"}}
39+ {{end}}
40+ {{range $prefix := $POSTendpoints}}
41+ {{ template "route" dict "Prefix" $prefix "Method" "POST"}}
42+ {{end}}
43+ {{range $prefix := $PUTendpoints}}
44+ {{ template "route" dict "Prefix" $prefix "Method" "PUT"}}
45+ {{end}}
46+ {{range $prefix := $PATCHendpoints}}
47+ {{ template "route" dict "Prefix" $prefix "Method" "PATCH"}}
48+ {{end}}
49+ {{range $prefix := $DELETEendpoints}}
50+ {{ template "route" dict "Prefix" $prefix "Method" "DELETE"}}
51+ {{end}}
You can’t perform that action at this time.
0 commit comments