lampac/BaseModule/Controllers/TmdbController.cs
lampac-talks f843f04fd4 chore: initial commit 154.3
Signed-off-by: lampac-talks <lampac-talks@users.noreply.github.com>
2026-01-30 16:23:09 +03:00

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");
}
}
}