-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Astro.clientAddress is not available for Node integration #6451
Comments
The adapter itself shouldn't need to add support, because it should be getting it for free because it uses this: https://github.com/withastro/astro/blob/main/packages/astro/src/core/app/node.ts#L26-L28 I'll write a test and try it out. |
This is working on my end. I pulled down your example and it works locally. Are you behind a proxy perhaps? |
@matthewp Thanks for looking into this. What happens when you click the Stackblitz link from above: Because I'm seeing that error when running on the Stackblitz website directly. If it's working for you, maybe we can figure out what the delta is between your environment and the Stackblitz example. But even if behind a proxy, it shouldn't throw an error right? |
I've updated the Stackblitz to astro 2.1.2 and @astrojs/node 5.1.0 and still no luck. Here's the error stack trace from Stackblitz:
@matthewp If you have this working locally, could you put it on Stackblitz so that I can take a look? |
@jcdogo does that Stackblitz work for you when running locally? It does for me. I think the issue is that Stackblitz doesn't support |
Yes, this is a limitation of Stackblitz: https://stackblitz.com/edit/node-qaglfo?file=index.js Should be working locally. |
What version of
astro
are you using?2.1.2
Are you using an SSR adapter? If so, which one?
@astrojs/node: 5.1.0
What package manager are you using?
npm
What operating system are you using?
Mac
Describe the Bug
When attempting to access
Astro.clientAddress
, I get this error:It looks like #3973 added support for this to most of the backends, but Node was missing from the list.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-q7ujbk?file=package.json,astro.config.mjs,tsconfig.json&on=stackblitz
Participation
The text was updated successfully, but these errors were encountered: