mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-03-10 03:55:45 -04:00
Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com> Co-authored-by: Joe Milazzo <josephmajora@gmail.com>
25 lines
558 B
C#
25 lines
558 B
C#
using System.IO;
|
|
using Kavita.API.Attributes;
|
|
using Kavita.API.Services;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Kavita.Server.Controllers;
|
|
|
|
[AllowAnonymous]
|
|
public class FallbackController : Controller
|
|
{
|
|
|
|
[SkipDeviceTracking]
|
|
public IActionResult Index()
|
|
{
|
|
if (HttpContext.Request.Path.StartsWithSegments("/api"))
|
|
{
|
|
return NotFound();
|
|
}
|
|
|
|
return PhysicalFile(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "index.html"), "text/HTML");
|
|
}
|
|
}
|
|
|