Skip to content

[CSL-3045] Added enforcement of https for service client url#309

Merged
esezen merged 2 commits into
masterfrom
csl-3045-client-js-enforce-https-on-serviceurl
Apr 3, 2024
Merged

[CSL-3045] Added enforcement of https for service client url#309
esezen merged 2 commits into
masterfrom
csl-3045-client-js-enforce-https-on-serviceurl

Conversation

@HFaifman

@HFaifman HFaifman commented Apr 1, 2024

Copy link
Copy Markdown
Contributor

This PR enforces HTTPs for the Service Url, similarly to what was done for the Node client in this PR

@HFaifman HFaifman requested a review from a team April 1, 2024 16:01

@esezen esezen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment about the test. The rest is looking good!

Comment thread spec/src/constructorio.js
expect(instance.options).to.have.property('networkParameters').to.equal(networkParameters);
});

it('Should return an instance with correct serviceUrl when a http serviceUrl is passed', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description says http serviceUrl is passed but we are passing an https value on line 87. Can we update the test to have an http value there.
Also it might be nice to drop the other parameters and make it more similar to this test so it's clear what's being tested here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be taken care of, thanks for pointing it out.

@HFaifman HFaifman requested a review from esezen April 2, 2024 20:18

@esezen esezen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@esezen esezen merged commit 9cc89e1 into master Apr 3, 2024
@esezen esezen deleted the csl-3045-client-js-enforce-https-on-serviceurl branch April 3, 2024 15:31
@xkr47

xkr47 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Hi! Would you approve adding an option to disable this "force https" feature?

I have implemented a "fake Constructor" in our java backend so we can prototype changes to our catalog updates on our local machines without having to actually upload the catalog to a Constructor index. If not, we'll have keep using a fork of this repo, which would mean added maintenance work and delayed updates for the client library. Nevertheless it is net beneficial for us by letting us develop our Constructor experience in an agile manner.

@xkr47

xkr47 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Welp, here it is anyway.. #460
EDIT: it was merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants