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

Don’t work middleware in astro:server:setup hook when deploying Netlify. #12582

Closed
1 task
sgalcheung opened this issue Dec 2, 2024 · 1 comment
Closed
1 task
Labels
needs triage Issue needs to be triaged

Comments

@sgalcheung
Copy link

Astro Info

"astro": "^5.0.0-beta

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

I wrote a custom loader for Squidex, which you can read here:
https://github.com/sgalcheung/starlight-squidex/blob/5dd82aa16ac7c542fdc1805567b8ab0f51ce56c3/packages/desquidex/src/integrations.ts#L12

Initially, I asked Netlify for help, but they told me the problem was that this new API(refreshContent) didn't work well in the Production environment, for now, is this an alpha feature? and could we use it in production?

related:
#11903
https://answers.netlify.com/t/netlify-dont-work-for-my-astro-middleware-endpoint/129673/3

What's the expected result?

Handle this middleware in a production environment.

Link to Minimal Reproducible Example

http://undefined

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Dec 2, 2024
@ascorbic
Copy link
Contributor

ascorbic commented Dec 2, 2024

astro:server:setup is a dev-server hook, and so is refreshContent. You're trying to use it in production, which isn't supported.

@ascorbic ascorbic closed this as completed Dec 2, 2024
@ascorbic ascorbic closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants