mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
Properly host static files and set base url
This commit is contained in:
@@ -135,10 +135,9 @@ namespace Jellyfin.Server.Extensions
|
||||
/// Extension method for adding the jellyfin API to the service collection.
|
||||
/// </summary>
|
||||
/// <param name="serviceCollection">The service collection.</param>
|
||||
/// <param name="baseUrl">The base url for the API.</param>
|
||||
/// <param name="pluginAssemblies">An IEnumberable containing all plugin assemblies with API controllers.</param>
|
||||
/// <param name="pluginAssemblies">An IEnumerable containing all plugin assemblies with API controllers.</param>
|
||||
/// <returns>The MVC builder.</returns>
|
||||
public static IMvcBuilder AddJellyfinApi(this IServiceCollection serviceCollection, string baseUrl, IEnumerable<Assembly> pluginAssemblies)
|
||||
public static IMvcBuilder AddJellyfinApi(this IServiceCollection serviceCollection, IEnumerable<Assembly> pluginAssemblies)
|
||||
{
|
||||
IMvcBuilder mvcBuilder = serviceCollection
|
||||
.AddCors(options =>
|
||||
@@ -151,7 +150,6 @@ namespace Jellyfin.Server.Extensions
|
||||
})
|
||||
.AddMvc(opts =>
|
||||
{
|
||||
opts.UseGeneralRoutePrefix(baseUrl);
|
||||
opts.OutputFormatters.Insert(0, new CamelCaseJsonProfileFormatter());
|
||||
opts.OutputFormatters.Insert(0, new PascalCaseJsonProfileFormatter());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user