@a83/orbiter-admin 0.3.22 → 0.3.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/server.js +3 -4
package/package.json
CHANGED
package/src/server.js
CHANGED
|
@@ -57,13 +57,12 @@ export function createApp(podPath) {
|
|
|
57
57
|
credentials: true,
|
|
58
58
|
}));
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
// Public routes
|
|
60
|
+
// Public routes (no CSRF needed — login can't be meaningfully CSRF-attacked)
|
|
63
61
|
app.route('/api/auth', authRoutes);
|
|
64
62
|
|
|
65
|
-
// Protected routes
|
|
63
|
+
// Protected routes — CSRF + auth
|
|
66
64
|
const api = new Hono();
|
|
65
|
+
api.use('*', csrfMiddleware(ALLOWED_ORIGINS));
|
|
67
66
|
api.use('*', requireAuth);
|
|
68
67
|
api.route('/collections', collectionRoutes);
|
|
69
68
|
api.route('/collections', entryRoutes);
|