23 lines
676 B
C#
23 lines
676 B
C#
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Shared;
|
|
using Shared.Engine;
|
|
using System.Web;
|
|
|
|
namespace Lampac.Controllers
|
|
{
|
|
public class TmdbController : BaseController
|
|
{
|
|
[HttpGet]
|
|
[AllowAnonymous]
|
|
[Route("tmdbproxy.js")]
|
|
[Route("tmdbproxy/js/{token}")]
|
|
public ActionResult TmdbProxy(string token)
|
|
{
|
|
string file = FileCache.ReadAllText("plugins/tmdbproxy.js").Replace("{localhost}", host);
|
|
file = file.Replace("{token}", HttpUtility.UrlEncode(token));
|
|
|
|
return Content(file, contentType: "application/javascript; charset=utf-8");
|
|
}
|
|
}
|
|
} |