caddy: added crowfx.web.id domain

This commit is contained in:
Tigor Hutasuhut 2024-09-16 08:34:40 +07:00
parent f7dbe0e3fc
commit 4cd08447ae

View file

@ -15,15 +15,7 @@ in
} }
''; '';
services.caddy.virtualHosts."router.tigor.web.id".extraConfig = '' services.caddy.virtualHosts =
@denied not remote_ip private_ranges
respond @denied "Access denied" 403
reverse_proxy 192.168.100.1
'';
services.caddy.virtualHosts."tigor.web.id".extraConfig =
let let
domains = attrsets.mapAttrsToList (name: _: strings.removePrefix "https://" name) config.services.caddy.virtualHosts; domains = attrsets.mapAttrsToList (name: _: strings.removePrefix "https://" name) config.services.caddy.virtualHosts;
sortedDomains = lists.sort (a: b: a < b) domains; sortedDomains = lists.sort (a: b: a < b) domains;
@ -53,6 +45,22 @@ in
</body> </body>
</html>''; </html>'';
in in
{
"router.tigor.web.id".extraConfig = ''
@denied not remote_ip private_ranges
respond @denied "Access denied" 403
reverse_proxy 192.168.100.1
'';
"tigor.web.id".extraConfig =
''
header Content-Type text/html
respond <<EOF
${html}
EOF 200
'';
"crowfx.web.id".extraConfig =
'' ''
header Content-Type text/html header Content-Type text/html
respond <<EOF respond <<EOF
@ -60,4 +68,6 @@ in
EOF 200 EOF 200
''; '';
}; };
};
} }