We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1301ba7 commit ede82bbCopy full SHA for ede82bb
articles/app-service/monitor-instances-health-check.md
@@ -107,7 +107,6 @@ def header_matches_env_var(header_value):
107
##### [Java](#tab/java)
108
109
```java
110
-import java.io.Console;
111
import java.security.MessageDigest;
112
import java.security.NoSuchAlgorithmException;
113
import java.util.Base64;
@@ -117,7 +116,7 @@ public static Boolean headerMatchesEnvVar(String headerValue) throws NoSuchAlgor
117
116
MessageDigest digest = MessageDigest.getInstance("SHA-256");
118
String envVar = System.getenv("WEBSITE_AUTH_ENCRYPTION_KEY");
119
String hash = new String(Base64.getDecoder().decode(digest.digest(envVar.getBytes(StandardCharsets.UTF_8))));
120
- return hash == headerValue;
+ return hash.equals(headerValue);
121
}
122
```
123
0 commit comments