Ensure scheme is set when creating proxy url

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
master
Andrew DeMaria 8 years ago
parent 5c71e85e74
commit 0eca4f4e19
No known key found for this signature in database
GPG Key ID: 0A3F5E91F8364EDF
  1. 3
      libresonic-main/src/main/java/org/libresonic/player/service/NetworkService.java

@ -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);
}

Loading…
Cancel
Save