update tabs

pull/702/head
Luke Pulverenti 8 years ago
parent 699bdacebc
commit 37dfbbe477

@ -102,14 +102,14 @@ namespace MediaBrowser.Server.Implementations.HttpServer
// new SessionAuthProvider(_containerAdapter.Resolve<ISessionContext>()), // new SessionAuthProvider(_containerAdapter.Resolve<ISessionContext>()),
//})); //}));
PreRequestFilters.Add((httpReq, httpRes) => //PreRequestFilters.Add((httpReq, httpRes) =>
{ //{
//Handles Request and closes Responses after emitting global HTTP Headers // //Handles Request and closes Responses after emitting global HTTP Headers
if (string.Equals(httpReq.Verb, "OPTIONS", StringComparison.OrdinalIgnoreCase)) // if (string.Equals(httpReq.Verb, "OPTIONS", StringComparison.OrdinalIgnoreCase))
{ // {
httpRes.EndRequest(); //add a 'using ServiceStack;' // httpRes.EndRequest(); //add a 'using ServiceStack;'
} // }
}); //});
HostContext.GlobalResponseFilters.Add(new ResponseFilter(_logger).FilterResponse); HostContext.GlobalResponseFilters.Add(new ResponseFilter(_logger).FilterResponse);
} }
@ -403,6 +403,17 @@ namespace MediaBrowser.Server.Implementations.HttpServer
return; return;
} }
if (string.Equals(httpReq.Verb, "OPTIONS", StringComparison.OrdinalIgnoreCase))
{
httpRes.StatusCode = 200;
httpRes.AddHeader("Access-Control-Allow-Origin", "*");
httpRes.AddHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, PATCH, OPTIONS");
httpRes.AddHeader("Access-Control-Allow-Headers", "Content-Type, Authorization, Range, X-MediaBrowser-Token, X-Emby-Authorization");
httpRes.ContentType = "text/html";
httpRes.Close();
}
var operationName = httpReq.OperationName; var operationName = httpReq.OperationName;
var localPath = url.LocalPath; var localPath = url.LocalPath;

@ -346,7 +346,7 @@ namespace MediaBrowser.WebDashboard.Api
if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase)) if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase))
{ {
sb.Append("<meta http-equiv=\"Content-Security-Policy\" content=\"default-src * 'unsafe-inline' 'unsafe-eval' data: filesystem:;\">"); sb.Append("<meta http-equiv=\"Content-Security-Policy\" content=\"default-src * 'unsafe-inline' 'unsafe-eval' data: gap: file: filesystem:;\">");
} }
sb.Append("<link rel=\"manifest\" href=\"manifest.json\">"); sb.Append("<link rel=\"manifest\" href=\"manifest.json\">");

Loading…
Cancel
Save