Documentation
¶
Overview ¶
Package unixhttp runs private HTTP surfaces — listeners that carry server-side rendering traffic and are never reachable from outside the host.
Production uses a Unix domain socket, which is private by construction: it has no port and no interface. Development uses a loopback port instead, because `nuxt dev` runs under Node, whose fetch has no way to dial a socket.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an HTTP server on one private listener.
func Listen ¶
Listen binds socket and starts serving handler. An existing socket is treated as stale and replaced; an ordinary file is never removed.
func ListenLoopback ¶ added in v0.1.1
ListenLoopback binds a loopback TCP address and starts serving handler.
This is the development counterpart to Listen. It refuses any address that is not loopback: this listener carries the same authenticated surface as the public one but without the edge in front of it, so binding it to a routable interface would publish an unguarded copy of the whole site.
func (*Server) Addr ¶ added in v0.1.1
Addr returns the address the server is reachable at: a socket path, or a resolved host:port.
func (*Server) Done ¶
func (s *Server) Done() <-chan struct{}
Done closes if the private HTTP server stops.