Skip to content

Comment on Show HN: This up votes itselfparent

Comments

That's not a good enough solution - there are decent reasons that a referrer header might be missing (some PC antivirus software strips out referrer headers for example). The only safe way to handle this is with a POST request protected by a CSRF token tied to a cookie.

+1 You can’t trust the Referer header.

GET with randomized ids and checking referrer should be good enough to keeps things simple.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.