Skip to content

Commit 719c34a

Browse files
authored
Merge pull request #8 from OpenConext/feature/add-internal-routes-to-health-and-info
Publish /interal/info and /interal/health routes
2 parents 3f36539 + 8db90ed commit 719c34a

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Changelog
2+
# 3.1.0
3+
Make the info and health endpoints available on both `/` and `/internal/` paths. 'Deprecating' the original /health and /info endpoints.
24

35
## 3.0.0
46
Add support for Symfony 5 and 6. Bump PHP to >= 7.2

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
A Symfony 3/4/5 bundle that adds a /health and /info endpoint to your application.
66

7-
The endpoints return JSON responses. The `/info` endpoint tries to give as much information about the currently installed
7+
The endpoints return JSON responses. The `/internal/info` endpoint tries to give as much information about the currently installed
88
version of the application as possible. This information is based on the build path of the installation. But also
99
includes the Symfony environment that is currently active and whether or not the debugger is enabled.
1010

11-
The `/health` endpoint reports on the health of the application. This information could be used for example by a load
11+
The `/internal/health` endpoint reports on the health of the application. This information could be used for example by a load
1212
balancer. Example output:
1313

1414
```json
@@ -22,6 +22,8 @@ When a health check failed the HTTP Response status code will be 503. And the JS
2222

2323
:exclamation: Please note that only the first failing health check is reported.
2424

25+
:exclamation: As of version 3.1.0 we started exposing the `health` and `info` routes on `/internal/`. On the next major version we will stop serving the `info` and `health` enpoints on `/`
26+
2527

2628
## Installation
2729

src/Resources/config/routing.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Deprecated routes: /info and /health are moving to /internal/info and internal/health respectively.
12
monitor.info:
23
path: /info
34
methods: [GET]
@@ -8,4 +9,16 @@ monitor.health:
89
path: /health
910
methods: [GET]
1011
defaults:
11-
_controller: openconext.monitor.controller.health
12+
_controller: openconext.monitor.controller.health
13+
14+
monitor.internal_info:
15+
path: /internal/info
16+
methods: [GET]
17+
defaults:
18+
_controller: openconext.monitor.controller.info
19+
20+
monitor.internal_health:
21+
path: /internal/health
22+
methods: [GET]
23+
defaults:
24+
_controller: openconext.monitor.controller.health

0 commit comments

Comments
 (0)