Added CORS header to load balancer, fallback no longer returns link but just the URL
This commit is contained in:
parent
a053b00d49
commit
dfa04695d4
1 changed files with 2 additions and 1 deletions
|
@ -520,8 +520,9 @@ int handleRequest(Socket::Connection &conn){
|
||||||
}
|
}
|
||||||
if (proto != "" && bestHost && bestScore){
|
if (proto != "" && bestHost && bestScore){
|
||||||
H.Clean();
|
H.Clean();
|
||||||
|
H.setCORSHeaders();
|
||||||
H.SetHeader("Location", bestHost->details->getUrl(stream, proto) + vars);
|
H.SetHeader("Location", bestHost->details->getUrl(stream, proto) + vars);
|
||||||
H.SetBody("<a href=\""+H.GetHeader("Location")+"\">Click here for stream</a>");
|
H.SetBody(H.GetHeader("Location"));
|
||||||
H.SendResponse("307", "Redirecting", conn);
|
H.SendResponse("307", "Redirecting", conn);
|
||||||
H.Clean();
|
H.Clean();
|
||||||
}else{
|
}else{
|
||||||
|
|
Loading…
Add table
Reference in a new issue