feat(web/inbox): add landing page for inbox.tvl.su

This landing page explains how to use the public-inbox.

Change-Id: I37d74decad5173ab35051970593f1d28001af2b4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7645
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Vincent Ambo 2022-12-27 14:53:15 +03:00 committed by tazjin
parent fe4cdff442
commit 62e19a8321
3 changed files with 108 additions and 10 deletions

View file

@ -1,4 +1,4 @@
{ config, ... }:
{ config, depot, ... }:
{
imports = [
@ -11,10 +11,17 @@
forceSSL = true;
extraConfig = ''
# nginx is incapable of serving a single file at /, hence this hack:
location = / {
return 302 https://inbox.tvl.su/depot;
index /landing-page;
}
location = /landing-page {
types { } default_type "text/html; charset=utf-8";
alias ${depot.web.inbox};
}
# rest of requests is proxied to public-inbox-httpd
location / {
proxy_pass http://localhost:${toString config.services.public-inbox.http.port};
}