Added generic CORS header adder, now used in controller, HLS output and internal HTTP handler.
This commit is contained in:
parent
2845cbedcb
commit
a3bf393bea
5 changed files with 20 additions and 5 deletions
|
@ -381,10 +381,7 @@ int Controller::handleAPIConnection(Socket::Connection & conn){
|
|||
}
|
||||
H.Clean();
|
||||
H.SetHeader("Content-Type", "text/javascript");
|
||||
H.SetHeader("Access-Control-Allow-Origin", "*");
|
||||
H.SetHeader("Access-Control-Allow-Methods", "GET, POST");
|
||||
H.SetHeader("Access-Control-Allow-Headers", "Content-Type, X-Requested-With");
|
||||
H.SetHeader("Access-Control-Allow-Credentials", "true");
|
||||
H.setCORSHeaders();
|
||||
if (jsonp == ""){
|
||||
H.SetBody(Response.toString() + "\n\n");
|
||||
}else{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue