mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
Add some common headers for the links check in docs
Closes #36675 Signed-off-by: rmartinc <rmartinc@redhat.com> (cherry picked from commit 17d2dd58cafea3e6548c70b17950f0fc5ebbbca8)
This commit is contained in:
parent
6da34dc836
commit
332c12bcea
@ -72,7 +72,7 @@ The password cannot be the same as the email address of the user.
|
||||
===== Regular expression
|
||||
|
||||
Password must match one or more defined Java regular expression patterns.
|
||||
See https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html[Java's regular expression documentation] for the syntax of those expressions.
|
||||
See https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/regex/Pattern.html[Java's regular expression documentation] for the syntax of those expressions.
|
||||
|
||||
===== Expire password
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@ import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
|
||||
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder;
|
||||
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||
import org.apache.hc.core5.http.HttpEntity;
|
||||
import org.apache.hc.core5.http.HttpHeaders;
|
||||
import org.apache.hc.core5.http.HttpStatus;
|
||||
import org.apache.hc.core5.http.ParseException;
|
||||
import org.apache.hc.core5.http.io.HttpClientResponseHandler;
|
||||
@ -77,6 +78,9 @@ public class HttpUtils {
|
||||
};
|
||||
|
||||
try {
|
||||
// add common headers that are needed by some pages
|
||||
method.addHeader(HttpHeaders.ACCEPT_LANGUAGE, "en-US,en;q=0.9");
|
||||
method.addHeader(HttpHeaders.ACCEPT, "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
|
||||
client.execute(method, responseHandler);
|
||||
} catch (Exception e) {
|
||||
response.setError("exception " + e.getMessage());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user