🐛 Dozens of bug fixes

This commit is contained in:
2025-07-19 17:33:46 +08:00
parent da5b3ac261
commit 3380c8f688
11 changed files with 17 additions and 23 deletions

View File

@@ -72,9 +72,6 @@ public class PostController(
[HttpGet("{id:guid}")]
public async Task<ActionResult<Post>> GetPost(Guid id)
{
if (HttpContext.Items["IsWebPage"] as bool? ?? true)
return RedirectToPage("/Posts/PostDetail", new { PostId = id });
HttpContext.Items.TryGetValue("CurrentUser", out var currentUserValue);
var currentUser = currentUserValue as Account;
List<Guid> userFriends = [];

View File

@@ -20,15 +20,6 @@ public static class ApplicationConfiguration
ConfigureForwardedHeaders(app, configuration);
app.UseCors(opts =>
opts.SetIsOriginAllowed(_ => true)
.WithExposedHeaders("*")
.WithHeaders()
.AllowCredentials()
.AllowAnyHeader()
.AllowAnyMethod()
);
app.UseWebSockets();
app.UseRateLimiter();
app.UseAuthentication();