Add docs (or potentially a recipe) for proxying requests from an endpoint #12191
Replies: 4 comments
-
Worth noting vite has an api for it too https://vite.dev/config/server-options#server-proxy |
Beta Was this translation helpful? Give feedback.
-
This does sound like a great recipe that we can link to using our Putting a |
Beta Was this translation helpful? Give feedback.
-
pinging for freshness! We would still happily accept some content about this! |
Beta Was this translation helpful? Give feedback.
-
I'll note there seems to be another way for manual usage, see the source of Hono proxy helper: https://github.com/honojs/hono/blob/main/src/helper/proxy/index.ts |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
📚 Subject area/topic
SSR
📋 Suggested page
https://docs.astro.build/en/guides/endpoints/#server-endpoints-api-routes
📋 General description or bullet points (if proposing new content)
We received a roadmap discussion for adding better proxy support from API endpoints. Based on the replies, this is possible today by returning the result of a
fetch()
call. This capability is not documented, nor is it very intuitive. Would be worth an explicit guide on Proxying Requests.🖥️ Reproduction of code samples in StackBlitz
No response
Beta Was this translation helpful? Give feedback.
All reactions