From 1c95ccd6e651c6b20b77362cb7df4a1f3cf0f563 Mon Sep 17 00:00:00 2001 From: Jamie Date: Tue, 21 Nov 2017 08:46:34 +0000 Subject: [PATCH] Return css as MIME text/css --- src/Ombi/Controllers/SettingsController.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Ombi/Controllers/SettingsController.cs b/src/Ombi/Controllers/SettingsController.cs index f5c0874b5..0f3d760b2 100644 --- a/src/Ombi/Controllers/SettingsController.cs +++ b/src/Ombi/Controllers/SettingsController.cs @@ -4,6 +4,7 @@ using System.Globalization; using System.Linq; using System.Net; using System.Net.Http; +using System.Net.Http.Headers; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; @@ -263,13 +264,10 @@ namespace Ombi.Controllers /// [HttpGet("themecontent")] [AllowAnonymous] - public async Task GetThemeContent([FromQuery]string url) + public async Task GetThemeContent([FromQuery]string url) { - var content = await _githubApi.GetThemesRawContent(url); - return new HttpResponseMessage(HttpStatusCode.OK) - { - Content = new StringContent(content, Encoding.UTF8, "text/css") - }; + var css = await _githubApi.GetThemesRawContent(url); + return Content(css, "text/css"); } ///