Expose combine method in CorsConfiguration

Closes gh-25716
This commit is contained in:
Rossen Stoyanchev 2020-09-25 21:36:18 +01:00
parent 852e904b08
commit b9ef5416b9
2 changed files with 24 additions and 0 deletions

View File

@ -134,6 +134,18 @@ public class CorsRegistration {
return this;
}
/**
* Apply the given {@code CorsConfiguration} to the one being configured via
* {@link CorsConfiguration#combine(CorsConfiguration)} which in turn has been
* initialized with {@link CorsConfiguration#applyPermitDefaultValues()}.
* @param other the configuration to apply
* @since 5.3
*/
public CorsRegistration combine(CorsConfiguration other) {
this.config.combine(other);
return this;
}
protected String getPathPattern() {
return this.pathPattern;
}

View File

@ -135,6 +135,18 @@ public class CorsRegistration {
return this;
}
/**
* Apply the given {@code CorsConfiguration} to the one being configured via
* {@link CorsConfiguration#combine(CorsConfiguration)} which in turn has been
* initialized with {@link CorsConfiguration#applyPermitDefaultValues()}.
* @param other the configuration to apply
* @since 5.3
*/
public CorsRegistration combine(CorsConfiguration other) {
this.config.combine(other);
return this;
}
protected String getPathPattern() {
return this.pathPattern;
}