File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -600,12 +600,13 @@ function getCaseOperationIdx(caseArr, operationId) {
600600// Returns:
601601// string - web-action URL
602602function makeWebActionBackendUrl ( endpointAction , endpointResponseType , isTargetUrl = false ) {
603+ protocol = getProtocolFromActionUrl ( endpointAction . backendUrl ) ;
603604 host = getHostFromActionUrl ( endpointAction . backendUrl ) ;
604605 ns = endpointAction . namespace ;
605606 pkg = getPackageNameFromFqActionName ( endpointAction . name ) || 'default' ;
606607 name = getActionNameFromFqActionName ( endpointAction . name ) ;
607608 reqPath = isTargetUrl && endpointResponseType === 'http' ? "$(request.path)" : "" ;
608- return 'https ://' + host + '/api/v1/web/' + ns + '/' + pkg + '/' + name + '.' + endpointResponseType + reqPath ;
609+ return protocol + ' ://' + host + '/api/v1/web/' + ns + '/' + pkg + '/' + name + '.' + endpointResponseType + reqPath ;
609610}
610611
611612/*
@@ -775,6 +776,14 @@ function getHostFromActionUrl(actionUrl) {
775776 return parseActionUrl ( actionUrl ) [ 2 ] ;
776777}
777778
779+ /*
780+ * https://172.17.0.1/api/v1/namespaces/whisk.system/actions/getaction
781+ * would return https
782+ */
783+ function getProtocolFromActionUrl ( actionUrl ) {
784+ return parseActionUrl ( actionUrl ) [ 1 ] ;
785+ }
786+
778787/*
779788 * Parses an openwhisk action name into its various components
780789 * Parameters
You can’t perform that action at this time.
0 commit comments