Skip to content

Commit 5829aed

Browse files
committed
chore(playground): added example of echo interceptor
1 parent fbe90b7 commit 5829aed

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

playground/app.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export default defineAppConfig({
2+
echo: {
3+
interceptors: {
4+
async onRequest(_app, ctx, logger) {
5+
const tenant = 'random-string'
6+
7+
ctx.options.headers.set('X-Echo-Tenant', tenant)
8+
logger.debug('Updated tenant header', tenant)
9+
}
10+
},
11+
}
12+
})

0 commit comments

Comments
 (0)