mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
Return css as MIME text/css
This commit is contained in:
parent
abfb873911
commit
1c95ccd6e6
1 changed files with 4 additions and 6 deletions
|
@ -4,6 +4,7 @@ using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
@ -263,13 +264,10 @@ namespace Ombi.Controllers
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("themecontent")]
|
[HttpGet("themecontent")]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task<HttpResponseMessage> GetThemeContent([FromQuery]string url)
|
public async Task<IActionResult> GetThemeContent([FromQuery]string url)
|
||||||
{
|
{
|
||||||
var content = await _githubApi.GetThemesRawContent(url);
|
var css = await _githubApi.GetThemesRawContent(url);
|
||||||
return new HttpResponseMessage(HttpStatusCode.OK)
|
return Content(css, "text/css");
|
||||||
{
|
|
||||||
Content = new StringContent(content, Encoding.UTF8, "text/css")
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue