Compare commits
2
Commits
995b5f4681
...
47dfee4c77
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47dfee4c77 | ||
|
|
c6687a5531 |
@@ -137,7 +137,14 @@ func main() {
|
|||||||
}
|
}
|
||||||
defer client.Close()
|
defer client.Close()
|
||||||
|
|
||||||
|
// Routes are served at their CANONICAL public paths under /api/orders, so
|
||||||
|
// ingress routes straight to this service with no rewrite/strip — you can
|
||||||
|
// curl the pod or the ingress and the path is identical (deploy/API-ROUTING.md).
|
||||||
|
// /healthz stays pod-local for probes (never exposed at the edge).
|
||||||
mux := http.NewServeMux()
|
mux := http.NewServeMux()
|
||||||
|
mux.HandleFunc("GET /healthz", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
w.WriteHeader(http.StatusOK)
|
||||||
|
})
|
||||||
mux.HandleFunc("GET /api/orders", func(w http.ResponseWriter, r *http.Request) {
|
mux.HandleFunc("GET /api/orders", func(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
|
|||||||
Reference in New Issue
Block a user