mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(api): pull SP avatars
This commit is contained in:
parent
63d9b411ae
commit
6c0c7a5c99
10 changed files with 153 additions and 58 deletions
|
|
@ -21,6 +21,12 @@ public class AuthorizationTokenHandlerMiddleware
|
|||
&& int.TryParse(sidHeaders[0], out var systemId))
|
||||
ctx.Items.Add("SystemId", new SystemId(systemId));
|
||||
|
||||
if (cfg.TrustAuth
|
||||
&& ctx.Request.Headers.TryGetValue("X-PluralKit-AppId", out var aidHeaders)
|
||||
&& aidHeaders.Count > 0
|
||||
&& int.TryParse(aidHeaders[0], out var appId))
|
||||
ctx.Items.Add("AppId", appId);
|
||||
|
||||
await _next.Invoke(ctx);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue