Age | Commit message (Collapse) | Author |
|
We can technically do vhosts with our current infrastructure of route
matching, but they should get some better support. Otherwise, we cannot
use things like SNI (server name indication) to send different
credentials depending on the virtual host.
The way it works now is basically that the server keeps a list of
installed vhosts, each with a domain that it matches and a loaded
certificate. Route matching in a vhost is still done the same old way,
but only routes for the matching vhost are considered in the first
place.
The API for runGeminiServer does not change, so the proper, vhost-using
API, will need a different function and API.
|
|
Otherwise, the server will never get a reply and instead we'll just
silently let the client timeout :-(
This change introduces the function "uncatch", which makes an error the
inner Cana computation explicit by returning the Either directly.
With the way this is written currently, we could probably get away with
using "catch" as well, along the lines of
r geminiRequest `catch` (const $ writeResponse context ...)
|
|
This is a working version that can serve pages, yay! A lot of features
still missing though, as well as proper package metadata.
|