CDN-CS: support passing a bin path as cdn worker -> forks a new proc

This commit is contained in:
Rory&
2026-04-12 21:04:22 +02:00
parent a92d127ff6
commit c24ef4c8a3
6 changed files with 63 additions and 17 deletions
@@ -11,7 +11,7 @@ namespace Spacebar.Cdn.Controllers;
public class UserController(LruFileCache lfc, IFileSource fs, CdnWorkerService cws) : ControllerBase {
[HttpGet("/avatars/{userId}/{hash}")]
[HttpGet("/avatars/{userId}/{hash}.{ext}")]
public async Task<IActionResult> GetUserAvatar(string userId, string hash, string ext = "png") {
public async Task<IActionResult> GetUserAvatar(string userId, string hash, string ext = "webp") {
DiscordImageResizeParams resizeParams = Request.GetResizeParams();
var originalKey = fs.BaseUrl + Request.Path;
var cacheKey = Request.Path + resizeParams.ToSerializedName();