-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: ADDONS_10.10, 11.3, 2021.0
-
Component/s: Rest API
-
Epic Link:
-
Team:PLATFORM
-
Sprint:nxplatform #16
-
Story Points:2
When deploying the Management REST API on the nxdev environment to qualify the 11.3, we discover that the guard checking the port doesn't work as expected when:
- Management REST API is configured to run behind the same port as regular REST API (ie: blank nuxeo.management.api.http.port)
- Nuxeo is behind a reverse proxy such as Nginx
The culprit code is:
protected boolean requestIsOnConfiguredPort(ServletRequest request) { int port = request.getServerPort(); String configPort = Framework.getProperty(MANAGEMENT_API_HTTP_PORT_PROPERTY, Framework.getProperty(PARAM_HTTP_PORT)); return Integer.parseInt(configPort) == port; }
In the case presented above, port is 80.
We want to fix this guard.