All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Go 1.25's CrossOriginProtection: A New Approach to CSRF Prevention

By

todsacerdoti

7mo ago· 9 min readenInsight

Summary

The article discusses Go 1.25's new http.CrossOriginProtection middleware and explores whether it enables secure web applications without traditional CSRF token-based protection. The author examines if this eliminates the need for third-party packages like justinas/nosurf or gorilla/csrf, concluding with a cautious 'yes' provided certain important conditions are met.

Key quotes

· 4 pulled
Go 1.25 introduced a new http.CrossOriginProtection middleware to the standard library
Have we finally reached the point where CSRF attacks can be prevented without relying on a token-based check?
Can we build secure web applications without bringing in third-party packages like justinas/nosurf or gorilla/csrf?
And I think the answer now may be a cautious 'yes' — so long as a few important conditions are met.
Snippet from the RSS feed
Go 1.25 introduced a new http.CrossOriginProtection middleware to the standard library — and it got me wondering:

You might also wanna read