Open Chriscbr opened 11 months ago
Hi,
This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
This would be pretty handy for cases where people would wanna use 3rd party frameworks. here's an example https://github.com/winglang/examples/pull/45
Hi,
This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
Feature Spec
A preflight API for running inflight code that should run on all uncaught routes of a
cloud.Api
:Since
req: cloud.ApiRequest
includespath
as a field, the inflight function can perform custom logic based on the actual route the user passed.Related to https://github.com/winglang/wing/pull/3973, https://github.com/winglang/wing/issues/1848
Use Cases
Specifying custom responses for when a request doesn't match any of the other routes you've specified on your
cloud.Api
.This kind of capability is available in other frameworks like Express.js using the "*" syntax (see examples here) and SST using the "{proxy+}" path variable (docs).
Implementation Notes
No response
Component
SDK
Community Notes