restrict roundcube only to vpn

This commit is contained in:
Ivan Dimitrov 2024-04-05 17:54:34 +03:00
parent 973298fc48
commit b163c249fa

View File

@ -1,10 +1,16 @@
{ pkgs, ... }:
{ config, pkgs, ... }:
let
webshiteConfig = ''
add_header 'Referrer-Policy' 'origin-when-cross-origin';
add_header X-Content-Type-Options nosniff;
add_header Onion-Location http://sxfx23zafag4lixkb4s6zwih7ga5jnzfgtgykcerd354bvb6u7alnkid.onion;
'';
restrictToVpn = ''
allow 10.0.0.2/32;
allow fdc9:281f:04d7:9ee9::2/128;
allow 10.0.0.3/32;
deny all;
'';
in
{
services = {
@ -32,6 +38,9 @@ in
};
extraConfig = webshiteConfig;
};
"${config.mailserver.fqdn}" = {
extraConfig = restrictToVpn;
};
"src.idimitrov.dev" = {
enableACME = true;
forceSSL = true;