mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Change reporting header param
This commit is contained in:
parent
b1e13bdc22
commit
902b7fc654
@ -300,7 +300,7 @@ public class InvokerHandler extends HttpServlet {
|
|||||||
apiEndpoint = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty("iot.gateway.host")
|
apiEndpoint = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty("iot.gateway.host")
|
||||||
+ HandlerConstants.COLON + HandlerUtil.getGatewayPort(req.getScheme());
|
+ HandlerConstants.COLON + HandlerUtil.getGatewayPort(req.getScheme());
|
||||||
|
|
||||||
if ("reports".equalsIgnoreCase(req.getHeader("appName"))){
|
if (HandlerConstants.REPORTS.equalsIgnoreCase(req.getHeader(HandlerConstants.APP_NAME))){
|
||||||
apiEndpoint = System.getProperty("iot.reporting.webapp.host");
|
apiEndpoint = System.getProperty("iot.reporting.webapp.host");
|
||||||
if (StringUtils.isBlank(apiEndpoint)){
|
if (StringUtils.isBlank(apiEndpoint)){
|
||||||
log.error("Reporting Endpoint is not defined in the iot-server.sh properly.");
|
log.error("Reporting Endpoint is not defined in the iot-server.sh properly.");
|
||||||
|
|||||||
@ -37,6 +37,8 @@ public class HandlerConstants {
|
|||||||
public static final String API_COMMON_CONTEXT = "/api";
|
public static final String API_COMMON_CONTEXT = "/api";
|
||||||
public static final String EXECUTOR_EXCEPTION_PREFIX = "ExecutorException-";
|
public static final String EXECUTOR_EXCEPTION_PREFIX = "ExecutorException-";
|
||||||
public static final String TOKEN_IS_EXPIRED = "ACCESS_TOKEN_IS_EXPIRED";
|
public static final String TOKEN_IS_EXPIRED = "ACCESS_TOKEN_IS_EXPIRED";
|
||||||
|
public static final String REPORTS = "Reports";
|
||||||
|
public static final String APP_NAME = "App-Name";
|
||||||
|
|
||||||
public static final String SCHEME_SEPARATOR = "://";
|
public static final String SCHEME_SEPARATOR = "://";
|
||||||
public static final String COLON = ":";
|
public static final String COLON = ":";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user