This commit is contained in:
syuilo
2021-12-09 23:58:30 +09:00
parent 0abe2dfee0
commit c69b72e199
573 changed files with 3318 additions and 3318 deletions

View File

@ -14,7 +14,7 @@ export default function(ctx: Koa.Context, user: ILocalUser, redirect = false) {
// SEE: https://github.com/koajs/koa/issues/974
// When using a SSL proxy it should be configured to add the "X-Forwarded-Proto: https" header
secure: config.url.startsWith('https'),
httpOnly: false
httpOnly: false,
});
//#endregion
@ -22,7 +22,7 @@ export default function(ctx: Koa.Context, user: ILocalUser, redirect = false) {
} else {
ctx.body = {
id: user.id,
i: user.token
i: user.token,
};
ctx.status = 200;
}
@ -35,7 +35,7 @@ export default function(ctx: Koa.Context, user: ILocalUser, redirect = false) {
userId: user.id,
ip: ctx.ip,
headers: ctx.headers,
success: true
success: true,
});
// Publish signin event