From dfa04695d43aa750367ec15f519d6a734e1483b5 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 26 Oct 2017 19:06:27 +0200 Subject: [PATCH] Added CORS header to load balancer, fallback no longer returns link but just the URL --- src/utils/util_load.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/util_load.cpp b/src/utils/util_load.cpp index fdeb2b8c..f56fe9fc 100644 --- a/src/utils/util_load.cpp +++ b/src/utils/util_load.cpp @@ -520,8 +520,9 @@ int handleRequest(Socket::Connection &conn){ } if (proto != "" && bestHost && bestScore){ H.Clean(); + H.setCORSHeaders(); H.SetHeader("Location", bestHost->details->getUrl(stream, proto) + vars); - H.SetBody("Click here for stream"); + H.SetBody(H.GetHeader("Location")); H.SendResponse("307", "Redirecting", conn); H.Clean(); }else{