Skip to content
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

Add docs (or potentially a recipe) for proxying requests from an endpoint #10351

Open
bholmesdev opened this issue Dec 12, 2024 · 2 comments
Open
Labels
add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. help wanted Issues looking for someone to run with them!

Comments

@bholmesdev
Copy link
Contributor

📚 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

@bholmesdev bholmesdev added the add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. label Dec 12, 2024
@florian-lefebvre
Copy link
Member

Worth noting vite has an api for it too https://vite.dev/config/server-options#server-proxy

@sarah11918 sarah11918 added the help wanted Issues looking for someone to run with them! label Dec 13, 2024
@sarah11918
Copy link
Member

This does sound like a great recipe that we can link to using our <RelatedRecipe/> component from the Endpoints page!

Putting a help wanted on this one in case anyone would like to put something together!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. help wanted Issues looking for someone to run with them!
Projects
None yet
Development

No branches or pull requests

3 participants