My Next.js app runs normal if I tried to access it from 127.0.0.1:8082
or localhost:8082
. The problem is when I want to access it using my machine’s IP address (e.g. http://10.233.xx.xx:8082/
) it throws an error Error: no native implementation of WebCrypto is available in current context
.
Based on the error message, this is the source of error:
> const session = require("iron-session/edge");
const cookieSet = {
cookieName: "cookiename",
password: "mypass",
cookieOptions: {
sameSite: "strict",
maxAge: 3600,
secure: process.env.NODE_ENV === "production",
},
};