mirror of
https://git.v0l.io/Kieran/void.cat.git
synced 2025-11-15 18:37:10 +01:00
Add CORS to api
This commit is contained in:
@@ -75,7 +75,8 @@ public class AuthController : Controller
|
||||
var claims = new List<Claim>()
|
||||
{
|
||||
new(ClaimTypes.NameIdentifier, user.Id.ToString()),
|
||||
new(ClaimTypes.Expiration, DateTimeOffset.UtcNow.AddHours(6).ToUnixTimeSeconds().ToString())
|
||||
new(JwtRegisteredClaimNames.Exp, DateTimeOffset.UtcNow.AddHours(6).ToUnixTimeSeconds().ToString()),
|
||||
new(JwtRegisteredClaimNames.Iat, DateTimeOffset.UtcNow.ToUnixTimeSeconds().ToString())
|
||||
};
|
||||
claims.AddRange(user.Roles.Select(a => new Claim(ClaimTypes.Role, a)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user