Vapor: 4.29.0 Release

Release date:
August 20, 2020
Previous version:
4.28.0 (released August 14, 2020)
Magnitude:
720 Diff Delta
Contributors:
1 total committer
Data confidence:
Commits:

Top Contributors in 4.29.0

dimitribouniol

Directory Browser for 4.29.0

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

This patch was authored by @dimitribouniol and released by @MrLotU.

Adds support for Unix Domain Sockets (#2471, #2226, #2371).

A server can be started using the serve command: fish vapor run serve --unix-socket /tmp/vapor.socket

Alternatively, the app can be configured in code to connect to a socket: swift app.http.server.configuration.unixDomainSocketPath = "/tmp/vapor.socket"

In either scenario, if a socket path is specified, it takes precedence over binding the server to a hostname/port. Note that TLS may be combined with this options if you wish the server to only listen to encrypted connections made to the socket file.

The socket file must not exist prior to starting the server. If one is left behind during an incomplete shutdown, however, and the app has permission to delete it, it will be overidden.

To assist with making connections to socket paths, URI.Scheme has a .httpUnixDomainSocket property.

try app.client.get(.init(scheme: .httpUnixDomainSocket, host: "/tmp/vapor.socket", path: "/foo"))