Skip to content

Commit 591ba61

Browse files
committed
ES-1393 Fix /readyz returning 503 if readinessProbes not defined in options
1 parent 479bb81 commit 591ba61

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: .changeset/curly-gifts-hang.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@vue-storefront/middleware": patch
3+
---
4+
5+
- **[FIXED]** Fix /readyz returning 503 if readinessProbes not passed in middleware.config.ts
6+
7+
Before this fix, sending a GET request to `http://localhost:4000/readyz` would return { "status": "error" } and a HTTP 503 status. This happened only when `readinessProbes` wasn't added to middleware options (the default behavior)

Diff for: packages/middleware/src/terminus.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const createReadyzHandler =
3030
};
3131

3232
export const createTerminusOptions = (
33-
readinessChecks: ReadinessProbe[]
33+
readinessChecks: ReadinessProbe[] = []
3434
): TerminusOptions => {
3535
return {
3636
useExit0: true,

0 commit comments

Comments
 (0)