Skip to content

Conversation

@ematipico
Copy link
Member

Changes

Closes #8299

Reverts part of changes of #8200

We can't load the middleware using a file system path because, in adapters like Vercel, the bundled files are eventually moved. For other adapters like cloudflare, that is not permitted.

Testing

Current tests should pass.

I also tested locally and checked that the middleware is correctly bundled in SSR.

Docs

N/A

@github-actions github-actions bot added pkg: integration Related to any renderer integration (scope) pkg: astro Related to the core `astro` package (scope) labels Aug 30, 2023
@changeset-bot
Copy link

changeset-bot bot commented Aug 30, 2023

🦋 Changeset detected

Latest commit: 09cc231

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable! Still see a few changes to be cleaned up.

@ematipico ematipico requested a review from natemoo-re August 30, 2023 16:58
@natemoo-re natemoo-re merged commit d4a6ab7 into main Aug 30, 2023
@natemoo-re natemoo-re deleted the fix/middleware-issue-bundling branch August 30, 2023 17:56
@astrobot-houston astrobot-houston mentioned this pull request Aug 30, 2023
ematipico added a commit that referenced this pull request Feb 6, 2025
…#8300)

* fix(ssr): inline middleware during the build, not rely on file system

* feedback

* chore: fix lint

---------

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Middleware not correctly execupted in SSR

4 participants