mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-19 15:25:21 +00:00
Dev/post refactor fixes (#927)
* Re-introduce outgoing message logging Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> * Websocket dumping * Sentry user count on API * Generate session ID upon opening websocket, fix gateway dumps * Async file io in src/gateway/events/Message.ts Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> * Async file io in src/util/util/Config.ts Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> * Make pre-commit hook executable Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> * Fixed sync file io in src/util/util/Config.ts Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> * Fixed missing await call in src/util/util/AutoUpdate.ts Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> * Add comment to src/gateway/events/Connection.ts Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> * Clean up gateway dumping code Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> Co-authored-by: Madeline <46743919+MaddyUnderStars@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { NextFunction, Request, Response } from "express";
|
||||
import { HTTPError } from "lambert-server";
|
||||
import { checkToken, Config, Rights } from "@fosscord/util";
|
||||
import * as Sentry from "@sentry/node";
|
||||
|
||||
export const NO_AUTHORIZATION_ROUTES = [
|
||||
// Authentication routes
|
||||
@@ -63,6 +64,8 @@ export async function Authentication(
|
||||
if (!req.headers.authorization)
|
||||
return next(new HTTPError("Missing Authorization Header", 401));
|
||||
|
||||
Sentry.setUser({ id: req.user_id });
|
||||
|
||||
try {
|
||||
const { jwtSecret } = Config.get().security;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user