Fix #3083: Set the Access-Control-Allow-Origin header to the request origin/host header if possible

This commit is contained in:
Frank Riley
2020-05-07 20:36:50 -07:00
parent 5ce008e02f
commit 3cb6fd8a27
3 changed files with 54 additions and 8 deletions

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Services;
using Microsoft.AspNetCore.Http;
namespace MediaBrowser.Controller.Net
@@ -38,5 +39,12 @@ namespace MediaBrowser.Controller.Net
/// <param name="context"></param>
/// <returns></returns>
Task RequestHandler(HttpContext context);
/// <summary>
/// Get the default CORS headers
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
IDictionary<string, string> GetCorsHeaders(IRequest req);
}
}