Skip to content

Commit

Permalink
fix: do not add extra 's' if the protocol is not 'http'
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Buziuk <[email protected]>
  • Loading branch information
ibuziuk committed Oct 10, 2023
1 parent 1bbcce6 commit 133ff5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/build/src/devfile/meta-yaml-to-devfile-yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ export class MetaYamlToDevfileYaml {
devfileEndpoint.attributes['type'] = 'main';
}

// if it's secured, remove secure option for now but add extra s on the protocol
// if it's secured, remove secure option for now but change protocol from 'http' to 'https'
if (devfileEndpoint.attributes && devfileEndpoint.attributes.secure === true) {
devfileEndpoint.secure = false;
delete devfileEndpoint.attributes['secure'];
// add extra s
if (devfileEndpoint.attributes.protocol) {
// switch 'http' to 'https'
if (devfileEndpoint.attributes.protocol && devfileEndpoint.attributes.protocol === "http") {
devfileEndpoint.attributes.protocol = `${devfileEndpoint.attributes.protocol}s`;
}
}
Expand Down

0 comments on commit 133ff5e

Please sign in to comment.