mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-25 00:09:02 +00:00
Support comma-separated X-Forwarded-Proto
Issue: SPR-12816
This commit is contained in:
@@ -303,7 +303,8 @@ public class UriComponentsBuilder implements Cloneable {
|
||||
|
||||
String protocolHeader = request.getHeaders().getFirst("X-Forwarded-Proto");
|
||||
if (StringUtils.hasText(protocolHeader)) {
|
||||
scheme = protocolHeader;
|
||||
String[] protocols = StringUtils.commaDelimitedListToStringArray(protocolHeader);
|
||||
scheme = protocols[0];
|
||||
}
|
||||
|
||||
builder.scheme(scheme);
|
||||
|
||||
Reference in New Issue
Block a user