Skip to content

Commit ddd2c5b

Browse files
authored
Update ClearSiteDataHeaderWriter.java
1 parent 79bc81f commit ddd2c5b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

web/src/main/java/org/springframework/security/web/header/writers/ClearSiteDataHeaderWriter.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -74,12 +74,12 @@ public void writeHeaders(HttpServletRequest request, HttpServletResponse respons
7474
if (this.requestMatcher.matches(request)) {
7575
if (!response.containsHeader(CLEAR_SITE_DATA_HEADER)) {
7676
response.setHeader(CLEAR_SITE_DATA_HEADER, this.headerValue);
77-
}
78-
} else {
79-
this.logger.debug(
77+
}
78+
return;
79+
}
80+
this.logger.debug(
8081
LogMessage.format("Not injecting Clear-Site-Data header since it did not match the requestMatcher %s",
8182
this.requestMatcher));
82-
}
8383
}
8484

8585
private String transformToHeaderValue(Directive... directives) {

0 commit comments

Comments
 (0)