You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTTP requests from any of the allowed list shall be able to reach the .get("/",(c)=>{...}.
What do you see instead?
When making HTTP requests from the same computer (localhost), a 403 is returned.
Additional information
At first I was only making my HTTP requests from a nextjs server component. This did not work. I then used an HTTP making client, and am running into the same issue.
The text was updated successfully, but these errors were encountered:
Thank you for your response. I can have a try allowing the other IP you provided and get back to you later on that.
I'm not too well versed in IP semantics beyond the basics so maybe I'm missing something, but shouldn't it still accept the original as well as the converted one? Or maybe a clarification in the docs of why this other IP is required and not the original?
What version of Hono are you using?
4.6.12
What runtime/platform is your app running on? (with version if possible)
Node
What steps can reproduce the bug?
import { serve } from "@hono/node-server";
import { Hono } from "hono";
import { logger } from "hono/logger";
import { ipRestriction } from "hono/ip-restriction";
import { getConnInfo } from "@hono/node-server/conninfo";
const app = new Hono()
.use(logger())
.use(async (c, next) => {
console.log(getConnInfo(c));
await next();
})
.use(
"*",
ipRestriction(getConnInfo, {
denyList: [],
allowList: ["127.0.0.1", "::1", "::ffff:127.0.0.1"],
}),
)
.get("/", (c) => {
return c.text("will not reach");
})
What is the expected behavior?
HTTP requests from any of the allowed list shall be able to reach the
.get("/",(c)=>{...}
.What do you see instead?
When making HTTP requests from the same computer (localhost), a 403 is returned.
Additional information
At first I was only making my HTTP requests from a nextjs server component. This did not work. I then used an HTTP making client, and am running into the same issue.
The text was updated successfully, but these errors were encountered: