Format logs, bump version, update Traefik config
- Reformat logging calls in server.js for readability - Bump API version from 1.0.0 to 2.1.2 - Update Traefik labels; switch TLS certresolver to letsencrypt-cloudflare
This commit is contained in:
@@ -6,9 +6,16 @@ await app.register(rateLimit, {
|
||||
global: false
|
||||
})
|
||||
|
||||
app.get('/', async (request, reply) => {
|
||||
return { hello: 'world' }
|
||||
})
|
||||
app.get(
|
||||
'/',
|
||||
{
|
||||
config: { rateLimit: { max: 3, timeWindow: '15 minutes' } }
|
||||
},
|
||||
|
||||
async (request, reply) => {
|
||||
return { hello: 'world' }
|
||||
}
|
||||
)
|
||||
|
||||
app.post(
|
||||
'/test',
|
||||
|
||||
Reference in New Issue
Block a user