Skip to content

Commit

Permalink
chore(action): add Action-Route in response header (#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedragon authored Nov 16, 2024
1 parent a3347ba commit 974b484
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/action/src/action-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export class ActionPlugin extends Plugin {
url: route.url,
handler: async (request, reply) => {
const context = {}
reply.header('Action-Route', encodeURIComponent(route.url))
return route.handler(request, context)
}
})
Expand All @@ -49,6 +50,7 @@ export class ActionPlugin extends Plugin {
schema,
handler: async (request, reply) => {
const context = {}
reply.header('Action-Route', encodeURIComponent(route.url))
return route.handler(request, context)
}
})
Expand Down

0 comments on commit 974b484

Please sign in to comment.