feat: add authenticated realtime presence
This commit is contained in:
+3
-1
@@ -20,6 +20,7 @@ import { registerHealth } from "./routes/health.ts";
|
||||
import { registerMarkers } from "./routes/markers.ts";
|
||||
import { registerOffices } from "./routes/offices.ts";
|
||||
import { registerPresence } from "./routes/presence.ts";
|
||||
import { registerRealtime } from "./routes/realtime.ts";
|
||||
import { registerSatellites } from "./routes/satellites.ts";
|
||||
import { registerSession } from "./routes/session.ts";
|
||||
import { registerWeather } from "./routes/weather.ts";
|
||||
@@ -51,6 +52,7 @@ export function buildApp(config: Config = loadConfig()): FastifyInstance {
|
||||
registerMarkers(app, services);
|
||||
registerOffices(app, services);
|
||||
registerPresence(app, services);
|
||||
registerRealtime(app, services);
|
||||
registerSession(app, services);
|
||||
|
||||
app.setNotFoundHandler(async (_req, reply) => {
|
||||
@@ -86,7 +88,7 @@ function registerCors(app: FastifyInstance, allowed: string[]): void {
|
||||
|
||||
reply.header("access-control-allow-origin", origin);
|
||||
reply.header("access-control-allow-headers", "authorization, content-type");
|
||||
reply.header("access-control-allow-methods", "GET, OPTIONS");
|
||||
reply.header("access-control-allow-methods", "GET, POST, OPTIONS");
|
||||
// Whatever the response ends up being, it depended on the Origin header.
|
||||
reply.header("vary", "Origin");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user