url change
This commit is contained in:
@@ -138,7 +138,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