Repair widget micro service, onboarding of widgets
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / service / MicroserviceProxyServiceImpl.java
index df835a9..ff8ee42 100644 (file)
@@ -30,6 +30,7 @@ import org.openecomp.portalapp.portal.domain.MicroserviceParameter;
 import org.openecomp.portalapp.portal.domain.WidgetCatalogParameter;
 import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;
 import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
 import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
 import org.openecomp.portalsdk.core.util.SystemProperties;
@@ -107,6 +108,8 @@ public class MicroserviceProxyServiceImpl implements MicroserviceProxyService {
                        HttpHeaders headers = new HttpHeaders();
                        headers.add("Authorization", "Basic " + base64Creds);
                        headers.setContentType(MediaType.APPLICATION_JSON);
+                       String rawCookie = request.getHeader("Cookie");
+                       headers.add("Cookie", rawCookie);
                        HttpEntity<String> entity = new HttpEntity<String>(headers);
 
                        String url = microserviceUrlConverter(data, params);
@@ -137,7 +140,7 @@ public class MicroserviceProxyServiceImpl implements MicroserviceProxyService {
 
                @SuppressWarnings({ "rawtypes", "unchecked" })
                ResponseEntity<Long> ans = (ResponseEntity<Long>) template.exchange(
-                               "https://"
+                               EcompPortalUtils.widgetMsProtocol() + "://"
                                                + consulHealthService.getServiceLocation(whatService,
                                                                SystemProperties.getProperty("microservices.widget.local.port"))
                                                + "/widget/microservices/widgetCatalog/parameters/" + widgetId,