This change makes it possible to host Macchiato-based services on IPC (aka "UNIX domain") sockets. You can then use something like Nginx to do SSL termination, auth, etc. before proxying requests to the Node.js process. That already works today with TCP-based HTTP sockets, but that approaches exposes the TCP port on the local machine, whereas UNIX sockets can be controlled with filesystem ACLs.
I tested this change on Linux with an Nginx frontend and confirmed that WebSockets work as well. Existing HTTP(S) functionality is unchanged.
Lastly, I chose to set the handler scheme to :http when using the :ipc protocol (as opposed to allowing that as an additional option) since my assumption is that the IPC listener will only ever be used when there is a front-end host that is managing the actual HTTP(S) connection.
This change makes it possible to host Macchiato-based services on IPC (aka "UNIX domain") sockets. You can then use something like Nginx to do SSL termination, auth, etc. before proxying requests to the Node.js process. That already works today with TCP-based HTTP sockets, but that approaches exposes the TCP port on the local machine, whereas UNIX sockets can be controlled with filesystem ACLs.
I tested this change on Linux with an Nginx frontend and confirmed that WebSockets work as well. Existing HTTP(S) functionality is unchanged.
Lastly, I chose to set the handler scheme to
:http
when using the:ipc
protocol (as opposed to allowing that as an additional option) since my assumption is that the IPC listener will only ever be used when there is a front-end host that is managing the actual HTTP(S) connection.