summary refs log tree commit diff
path: root/ReferenceClientProxyImplementation/Controllers/StaticController.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-02-23 02:03:20 +0100
committerRory& <root@rory.gay>2026-02-23 02:03:20 +0100
commit77a609758bb80bac9497d2e3988550f8be578407 (patch)
tree991a9d258ca4fece1132a1a344d0fe11e3b03d51 /ReferenceClientProxyImplementation/Controllers/StaticController.cs
downloadReferenceClientProxyImplementation-77a609758bb80bac9497d2e3988550f8be578407.tar.xz
Initial commit HEAD master
Diffstat (limited to 'ReferenceClientProxyImplementation/Controllers/StaticController.cs')
-rw-r--r--ReferenceClientProxyImplementation/Controllers/StaticController.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/ReferenceClientProxyImplementation/Controllers/StaticController.cs b/ReferenceClientProxyImplementation/Controllers/StaticController.cs
new file mode 100644

index 0000000..a2ecf2c --- /dev/null +++ b/ReferenceClientProxyImplementation/Controllers/StaticController.cs
@@ -0,0 +1,15 @@ +using Microsoft.AspNetCore.Mvc; +using ReferenceClientProxyImplementation.Helpers; + +namespace ReferenceClientProxyImplementation.Controllers; + +[Controller] +[Route("/")] +public class StaticController : Controller { + [HttpGet("/resources/{*res:required}")] + public object Resource(string res) { + if (System.IO.File.Exists("./Resources/Static/" + res)) + return Resolvers.ReturnFile("./Resources/Static/" + res); + return new RedirectResult("https://discord.gg/assets/" + res); + } +} \ No newline at end of file