Ensure scheme is set when creating proxy url
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
This commit is contained in:
@@ -84,6 +84,9 @@ public class NetworkService {
|
||||
String host = proxyHost.getHost();
|
||||
int port = proxyHost.getPort();
|
||||
String scheme = request.getHeader(X_FORWARDED_PROTO);
|
||||
if(StringUtils.isBlank(scheme)) {
|
||||
throw new RuntimeException("Scheme not provided");
|
||||
}
|
||||
|
||||
return new URI(scheme, null, host, port, urlPathHelper.getContextPath(request), null, null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user