Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
5eda328
volume mapping & delete with clean up
Nov 8, 2018
f4b4540
volume mapping & delete with clean up
Nov 9, 2018
f4905f2
Merge branch 'develop' of https://github.com/ioFog/FogController into…
Nov 9, 2018
b0f0044
Merge branch 'develop' of https://github.com/ioFog/FogController into…
Nov 9, 2018
04d9e0d
Merge branch 'develop' of https://github.com/ioFog/FogController into…
Nov 9, 2018
bfcb07b
Merge branch 'develop' of https://github.com/ioFog/FogController into…
Nov 12, 2018
fe5ec89
Merge branch 'develop' of https://github.com/ioFog/FogController into…
Nov 12, 2018
2c71a29
Merge branch 'develop' of https://github.com/ioFog/FogController into…
Nov 12, 2018
cfec99d
Merge branch 'develop' of https://github.com/ioFog/FogController into…
Nov 12, 2018
189046b
Merge branch 'develop' of https://github.com/ioFog/FogController into…
Nov 12, 2018
3fa9b51
Merge branch 'develop' of https://github.com/ioFog/FogController into…
Nov 12, 2018
4a6b647
Merge branch 'develop' of https://github.com/ioFog/FogController into…
Nov 12, 2018
c935f42
Merge branch 'develop' of https://github.com/ioFog/FogController into…
Nov 12, 2018
f2b6d83
Merge branch 'develop' of https://github.com/ioFog/FogController into…
Nov 12, 2018
cc5908d
Merge branch 'develop' of https://github.com/ioFog/FogController into…
Nov 12, 2018
98affa1
connector non dev mode fix EWC-339
Nov 12, 2018
74f71e6
Merge branch 'develop' of https://github.com/ioFog/FogController into…
Nov 12, 2018
4bd5e17
Merge remote-tracking branch 'origin/develop' into epankou/bug-non-de…
Nov 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/helpers/app-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ function handleCLIError(error) {
}
}

function trimCertificate(cert) {
let result = cert.replace(/(^[\s\S]*-{3,}BEGIN CERTIFICATE-{3,}[\s]*)/, "");
result = result.replace(/([\s]*-{3,}END CERTIFICATE-{3,}[\s\S]*$)/, "");
return result;
}

module.exports = {
encryptText,
decryptText,
Expand All @@ -173,5 +179,6 @@ module.exports = {
findAvailablePort,
stringifyCliJsonSchema,
isValidPublicIP,
handleCLIError
handleCLIError,
trimCertificate
};
3 changes: 2 additions & 1 deletion src/services/microservices-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const FlowService = require('../services/flow-service');
const CatalogService = require('../services/catalog-service');
const RoutingManager = require('../sequelize/managers/routing-manager');
const Op = require('sequelize').Op;
const fs = require('fs');

const _listMicroservices = async function (flowId, user, isCLI, transaction) {
if (!isCLI) {
Expand Down Expand Up @@ -602,7 +603,7 @@ async function _createPortMappingOverConnector(microservice, portMappingData, us
const netwMsConfig = {
'mode': 'public',
'host': connector.domain,
'cert': connector.cert,
'cert': AppHelper.trimCertificate(fs.readFileSync(connector.cert, "utf-8")),
'port': ports.port1,
'passcode': ports.passcode1,
'connectioncount': 60,
Expand Down