mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-31 22:25:43 +00:00
22 lines
373 B
Nix
22 lines
373 B
Nix
{
|
|
mkEndpoint = domain: port: ssl: {
|
|
host = domain;
|
|
localPort = port;
|
|
useSsl = ssl;
|
|
publicPort =
|
|
if ssl then
|
|
443
|
|
else if domain == "localhost" then
|
|
port
|
|
else
|
|
80;
|
|
};
|
|
|
|
mkEndpointRaw = domain: port: publicPort: ssl: {
|
|
host = domain;
|
|
localPort = port;
|
|
useSsl = ssl;
|
|
publicPort = publicPort;
|
|
};
|
|
}
|