-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Wrong pathname in Server Islands #11498
Comments
Hello @jamesli2021. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
I'm not really sure it's possible, at all. The URL is built from the Request, which is the endpoint of the component. Please let's discuss this in the roadmap and make sure this should be the actual behaviour or not |
What's the use-case? The url you're seeing is the URL from the server island request. If you need the URL of the page you can pass it as a prop: |
@matthewp This approach works, but it might be less intuitive for developers, especially theme developers. In this case, we should evaluate how they are impacted by this breaking change. I get another issue with header in
|
Hello @jamesli2021. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
This is a new feature that has different requirements, limitations and use cases that aren't defined yet, so it's a bit early to call it "breaking change", especially when it's opt-in. Can you provide a reproduction for your issue? |
@matthewp In dev mode, the path will return session return
@ematipico I like to tackle on |
You should be able to user middleware and get cookies. If you are having an issue there it's likely a bug. Islands should get all of the things that |
As a workaround, you may send headers if you intercept and manipulate
|
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
During testing, Server Islands uses the
/_server-islands/OtherPage
pathname instead of/
when theserver:defer
directive is set on the component.OtherPage.astro
Output
What's the expected result?
Output should be
/
and original pathname.Link to Minimal Reproducible Example
NA
Participation
The text was updated successfully, but these errors were encountered: