-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
Widget actions: Add a HTTP action to perform HTTP requests #2711
Conversation
Signed-off-by: Florian Hotze <[email protected]>
Signed-off-by: Florian Hotze <[email protected]>
#2189 Bundle Size — 10.82MiB (~+0.01%).4f7e22f(current) vs f745fa9 main#2188(baseline) Warning Bundle contains 2 duplicate packages – View duplicate packages Bundle metrics
|
Current #2189 |
Baseline #2188 |
|
---|---|---|
Initial JS | 1.89MiB (+0.04% ) |
1.89MiB |
Initial CSS | 576.5KiB |
576.5KiB |
Cache Invalidation | 17.42% |
17.81% |
Chunks | 226 |
226 |
Assets | 249 |
249 |
Modules | 2914 |
2914 |
Duplicate Modules | 149 |
149 |
Duplicate Code | 1.8% |
1.8% |
Packages | 96 |
96 |
Duplicate Packages | 2 |
2 |
Bundle size by type 1 change
1 regression
Current #2189 |
Baseline #2188 |
|
---|---|---|
JS | 9.04MiB (~+0.01% ) |
9.04MiB |
CSS | 862.88KiB |
862.88KiB |
Fonts | 526.1KiB |
526.1KiB |
Media | 295.6KiB |
295.6KiB |
IMG | 140.74KiB |
140.74KiB |
HTML | 1.24KiB |
1.24KiB |
Other | 871B |
871B |
Bundle analysis report Branch florian-h05:action-http Project dashboard
Generated by RelativeCI Documentation Report issue
@ghys Thanks for your feedback. |
Okay we can use CSP to limit to which domains a request can be sent by this action. |
Okay this seems to be very restrictive and not super user-friendly ... |
I totally forgot there was already a CSP... I wonder if we could have a configurable whitelist of allowed domains that would alter the CSP - maybe by generating the index.html dynamically. |
I think it is actually easier than that: However we need to figure out how to provide the list of allowed domains in a file-only config … it should help to have a look at the code of the exec binding (https://github.com/openhab/openhab-addons/blob/e62f3af4c7173145f6f2742e3a88631f5c5fdbb8/bundles/org.openhab.binding.exec/src/main/java/org/openhab/binding/exec/internal/ExecWhitelistWatchService.java#L41). |
Ah yes indeed... so maybe via a derived servlet to serve that index page (and the rest, possibly) - or equivalent. |
This allows to perform HTTP requests from inside widget actions.
The use case might be limited, but for example this can be used to allow access to local only ressources/smart devices that should not be made available via remote access and hence cannot be integrated as Items into openHAB for security purpose.