andystevenson
andystevenson
Explore posts from servers
HHono
Created by andystevenson on 8/5/2024 in #help
conninfo doesn't check for x-forwarded-for?
I am on a host with a caddyserver reverse-proxy and want to make sure the client is coming from a whitelist set of IP addresses. So I set up the server using the ipRestriction middleware as per the docs. I am running it using bun. However the reverse proxy uses the x-forwarded-for header. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For I was wondering should conninfo or the ipRestriction middleware check for it?
3 replies
HHono
Created by andystevenson on 7/15/2024 in #help
JSX.Element
Namespace ... JSX has no exported member 'Element'. I have a simple type like this
export type PageProps = {
tags: Tags
children?: JSX.Element[]
}
export type PageProps = {
tags: Tags
children?: JSX.Element[]
}
My tsconfig includes
...
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
...
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
Any idea how to remove the error?
1 replies
HHono
Created by andystevenson on 5/30/2024 in #help
Does the context object get shared across all sessions?
I am using hono-sessions. I have several different users. Am I correct in assuming that each invocation in hono shares 1 context object ... so if I store something directly using context.set(x, y) it will be shared by every route?
2 replies
HHono
Created by andystevenson on 5/28/2024 in #help
hono-sessions not sharing state between routes.
Hi was just working through hello world login/logout scenario but cannot seem to get the state shared between different routes created in separate files?
9 replies