-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cloud.Api catch-all route handler #3983
Comments
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. |
This would be pretty handy for cases where people would wanna use 3rd party frameworks. here's an example winglang/examples#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. |
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. |
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 #3973, #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
The text was updated successfully, but these errors were encountered: