telefonicaid / telefonicaid/iotagent-node-lib
NGSIv2 subscribe does not support https in cbHost payload
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 62
- Forks
- 90
- Avg merge
- 2h 35m
- Merged PRs (30d)
- 1
Description
current code is as follows:
if (device.cbHost) {
options.uri = 'http://' + device.cbHost + '/v2/subscriptions';
} else {
options.uri = config.getConfig().contextBroker.url + '/v2/subscriptions';
}
while it should (probably) be:
if (device.cbHost && device.cbHost.indexOf('://') !== -1) {
options.uri = device.cbHost + '/v2/subscriptions';
} else if (device.cbHost && device.cbHost.indexOf('://') === -1) {
options.uri = 'http://' + device.cbHost + '/v2/subscriptions';
} else {
options.uri = config.getConfig().contextBroker.url + '/v2/subscriptions';
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the codebase for the shown device.cbHost and options.uri subscription logic, then trace NGSIv2 subscription creation. Verify that a cbHost with an explicit scheme is preserved, a bare host defaults to HTTP, and an absent host uses the configured broker URL; run the relevant subscription tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100