Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
x/net/websocket: server rejects requests without an origin header #4198
go version go1.0.2 The websocket server rejects requests (with a 400 status code) that do not include an origin header. Browsers send an origin header, but for non-browsers there are some notes about this in the spec (rfc6455): """ This header field is sent by browser clients; for non-browser clients, this header field may be sent if it makes sense in the context of those clients. """ By default most non-browser websocket client APIs do not send an origin header, and it would seem it's a better approach if the websocket server does not require one.