KEYCLOAK-14132 DefaultSecurityHeadersProvider should support 307 as redirect code

This commit is contained in:
Martin Kanis 2020-05-19 10:55:22 +02:00 committed by Stian Thorgersen
parent 206ccb3f13
commit 8f18cf1646

View file

@ -134,7 +134,9 @@ public class DefaultSecurityHeadersProvider implements SecurityHeadersProvider {
return true;
}
int status = responseContext.getStatus();
if (status == 201 || status == 204 || status == 301 || status == 302 || status == 303 || status == 400 || status == 401 || status == 403 || status == 404) {
if (status == 201 || status == 204 ||
status == 301 || status == 302 || status == 303 || status == 307 || status == 308 ||
status == 400 || status == 401 || status == 403 || status == 404) {
return true;
}
if (requestContext.getMethod().equalsIgnoreCase("OPTIONS")) {