From 0eca4f4e191651df46cfdce89b2a389e68857d0d Mon Sep 17 00:00:00 2001 From: Andrew DeMaria Date: Thu, 18 May 2017 18:38:50 -0600 Subject: [PATCH] Ensure scheme is set when creating proxy url Signed-off-by: Andrew DeMaria --- .../java/org/libresonic/player/service/NetworkService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libresonic-main/src/main/java/org/libresonic/player/service/NetworkService.java b/libresonic-main/src/main/java/org/libresonic/player/service/NetworkService.java index ab522d21..1a43381c 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/service/NetworkService.java +++ b/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); }