Fix SAT warnings (#14214)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -155,6 +155,7 @@ You must either
|
||||
* port forward your openHAB installation to port 80,
|
||||
(`iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080`)
|
||||
* install a reverse proxy on port 80, for example nginx with the following configuration:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
@@ -167,10 +168,12 @@ You must either
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
* or let openHAB run on port 80 (the entire java process requires elevated privileges).
|
||||
|
||||
* For Amazon Echo the pairing process may fail due to a 302 response from openHAB, this can be resolved by using a reverse proxy to change the request url from `/api` to `/api/`, for example nginx with the following configuration:
|
||||
```
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
location /api {
|
||||
@@ -178,6 +181,7 @@ You must either
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Please open port 80 tcp and port 1900 udp in your firewall installation.
|
||||
|
||||
You can test if the hue emulation does its job by enabling pairing mode including the option "Amazon Echo device discovery fix".
|
||||
|
||||
@@ -74,7 +74,7 @@ public class NetworkUtils {
|
||||
/**
|
||||
* Adds cors headers to the given response and returns it.
|
||||
*/
|
||||
public static ResponseBuilder ResponseWithCors(ResponseBuilder response) {
|
||||
public static ResponseBuilder responseWithCors(ResponseBuilder response) {
|
||||
return response.encoding(StandardCharsets.UTF_8.name()) //
|
||||
.header("Access-Control-Allow-Origin", "*")
|
||||
.header("Access-Control-Allow-Headers", "origin, content-type, accept, authorization")
|
||||
|
||||
@@ -95,7 +95,7 @@ public class CommonSetup {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> Storage<T> getStorage(String name) {
|
||||
if (name.equals("hueEmulationUsers")) {
|
||||
if ("hueEmulationUsers".equals(name)) {
|
||||
return (Storage<T>) new DummyUsersStorage();
|
||||
}
|
||||
throw new IllegalStateException();
|
||||
|
||||
@@ -122,7 +122,7 @@ public class UsersAndConfigTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void UnauthorizedAccessTest() {
|
||||
public void unauthorizedAccessTest() {
|
||||
// Unauthorized config
|
||||
Response response;
|
||||
response = commonSetup.client.target(commonSetup.basePath + "/config").request().get();
|
||||
|
||||
Reference in New Issue
Block a user