-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LSP and REST via https not working together #83
Comments
Hey @lsiepel, IMO there's no need to introduce a new configuration parameter if we can pass https to the URI string ( Also see #82 and this post - it contains not yet released version of the extension with a fix for REST connection. |
Well, it might not be needed because it works, but imho the boolean is cleaner and clear from a user perspective. Anyway thanks for your comment, i installed the 0.3.5 from the file, but no luck. Could it be that because the setting openhab.host is used for both UI-stuff (REST, classic ui etc.) and LSP, while containing the protocol, both have to be on the same protocol? Many people make use of https because they have the openHAB accessible from the internet. But LSP is almost never publicly available and about nobody serves it by https. I'm a C# and VS2015 amateur, before i make PR's i have a to learn a lot. :-) |
last comment was one year ago... |
Well, i never managed to get it to work. IMHO, LSP and REST are two seperate consumable sources and they should be configurable individually. Unfortunately, im unable to construct a PR because of a lack of skills and time. |
See my comment in another issue: Probably this will be easier in the future. |
I have exactly the same issue in the current version. I shared more information in this openHAB community thread: |
When using https, i can't use LSP. Even when LSP port 5007 is reachable (local network)
With this workspace config i got REST to work, but LSP isn’t
{
"openhab.host": "https://my.domain.tld",
"openhab.port": 443,
}
When the config is changed to a fixed IP, the LSP is working but REST isn't. (nginx is set only to allow https on port 443)
{
"openhab.host": "192.168.1.255",
"openhab.port": 443,
}
Not sure how the host string is handled within the VS Code extension, but i guess https:// is not stripped when used for LSP server connection. Edit: Just checked https://github.com/openhab/openhab-vscode/blob/master/src/LanguageClient/LanguageClientProvider.ts and it's not stripped.
I would recommend an extra setting: openhab.usehttps {false|true} that defaults to false. And disallow any other string in openhab.host then DNS or IP.
{
"openhab.host": "my.domain.tld",
"openhab.usehttps": true,
"openhab.port": 443,
}
That way it's more clear how https can be configured and you can use this new setting to support both LSP and REST at the same time when using https.
The text was updated successfully, but these errors were encountered: