Skip to content

Commit

Permalink
fix: remove X-Requested-With restriction (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanaturner authored Sep 5, 2024
1 parent 07211cb commit 6a2bf5d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
12 changes: 0 additions & 12 deletions server/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,6 @@ router.use(cors({

router.use(middleware.authSanitizer);

router.use(middleware.middlewareFilter(
[
...ssoRoutes,
...apiAuthRoutes,
'/commons/kbexport',
'/analytics/learning/init',
'/payments/webhook',
'/cloudflare/stream-url',
],
middleware.requestSecurityHelper,
));

/* Auth */
router.route('/oidc/libretexts').get(authAPI.completeLogin);

Expand Down
1 change: 1 addition & 0 deletions server/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ function authSanitizer(req: Request, _res: Response, next: NextFunction) {
/**
* Performs security checks on incoming requests by examing header values.
*
* @deprecated
* @param {express.Request} req - Incoming request object.
* @param {express.Response} res - Outgoing response object.
* @param {express.NextFunction} next - Next middleware function to run.
Expand Down

0 comments on commit 6a2bf5d

Please sign in to comment.