No auth on root route for health checks, fix suggestions request
This commit is contained in:
parent
0ac971e6b4
commit
f7c3bc2823
5 changed files with 25 additions and 6 deletions
|
|
@ -20,11 +20,15 @@ const corsOptions = {
|
|||
app.use(cors(corsOptions));
|
||||
|
||||
if (getAccessKey()) {
|
||||
app.all('*', requireAccessKey);
|
||||
app.all('/api/*', requireAccessKey);
|
||||
}
|
||||
|
||||
app.use(express.json());
|
||||
|
||||
app.get('/', (_, res) => {
|
||||
res.status(200).json({ status: 'ok' });
|
||||
});
|
||||
|
||||
app.use('/api', routes);
|
||||
app.get('/api', (_, res) => {
|
||||
res.status(200).json({ status: 'ok' });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue