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
With this example, the Blockfrost key isn't leaked, but there is nothing stopping an adversairy from abusing the endpoint. We should put some effort into stopping this. There are some headers that could be used, but AFAIK, there is nothing that can't be spoofed. Will look into it.
The text was updated successfully, but these errors were encountered:
constwhitelistedIps=["127.0.0.1",]constipIsWhitelisted=(ipAddress?: string)=>ipAddress&&whitelistedIps.includes(ipAddress)// later ...constipAddress=req.headers["x-real-ip"]?.toString()||req.headers["x-forwarded-for"]?.toString()if(!ipIsWhitelisted(ipAddress))returnres.status(401).json({message: "Unauthorized"})
With this example, the Blockfrost key isn't leaked, but there is nothing stopping an adversairy from abusing the endpoint. We should put some effort into stopping this. There are some headers that could be used, but AFAIK, there is nothing that can't be spoofed. Will look into it.
The text was updated successfully, but these errors were encountered: