Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
matko committed Oct 31, 2023
1 parent f285807 commit 4617118
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ declare namespace Express {

var app = express();
app.use(cors());
function not_in_whitelist(s: string, _req: unknown) {
function not_in_whitelist(s: string, _req: unknown): boolean {
const whitelist = [
/^\/api\/indexes/,
/^\/api\/changes/,
/^\/api\/tables/,
/^\/api\/organizations\/[^/]+\/openaikey$/,
];
const result = whitelist.some((re) => {
s.match(re);
return s.match(re);
});

return !result;
Expand Down

0 comments on commit 4617118

Please sign in to comment.