Skip to content

Commit

Permalink
chore: limit set-cursor endpoint to zone environment
Browse files Browse the repository at this point in the history
  • Loading branch information
aleortega committed Jul 5, 2024
1 parent a45a0c8 commit eb988c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controllers/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export async function setupRouter({ components }: GlobalContext): Promise<Router
const { config } = components

const signingKey = await config.getString('SIGNING_KEY')
if (signingKey) {
const isProdEnvironment = (await config.getString('NETWORK'))?.toLocaleLowerCase() === 'mainnet'
if (signingKey && !isProdEnvironment) {
router.post('/producers/:producer/set-since', bearerTokenMiddleware(signingKey), setCursorHandler)
}

Expand Down

0 comments on commit eb988c1

Please sign in to comment.