Status : Fix proxy access.
This commit is contained in:
parent
6e0acf9132
commit
f1e37c8c3d
|
@ -19,6 +19,7 @@ in {
|
|||
container.config.dns.address
|
||||
];
|
||||
};
|
||||
|
||||
services.uptime-kuma = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
, ... }: {
|
||||
inherit host;
|
||||
|
||||
mkContainer = config: cfg: lib.recursiveUpdate cfg {
|
||||
mkContainer = config: cfg: lib.recursiveUpdate {
|
||||
autoStart = true;
|
||||
hostAddress = host;
|
||||
localAddress = config.address;
|
||||
privateNetwork = true;
|
||||
};
|
||||
} cfg;
|
||||
|
||||
mkContainerConfig = config: cfg: lib.recursiveUpdate cfg {
|
||||
mkContainerConfig = config: cfg: lib.recursiveUpdate {
|
||||
nixpkgs.pkgs = lib.mkForce pkgs;
|
||||
system.stateVersion = const.stateVersion;
|
||||
|
||||
|
@ -29,13 +29,13 @@
|
|||
useHostResolvConf = lib.mkForce false;
|
||||
firewall.enable = false;
|
||||
};
|
||||
};
|
||||
} cfg;
|
||||
|
||||
mkContainerDir = cfg: dirs: map (path: "d '${cfg.storage}/${path}' 1777 root root - -") dirs;
|
||||
|
||||
mkServer = cfg: lib.recursiveUpdate cfg {
|
||||
mkServer = cfg: lib.recursiveUpdate {
|
||||
forceSSL = false;
|
||||
};
|
||||
} cfg;
|
||||
|
||||
attachMedia = type: paths: ro: builtins.listToAttrs (lib.imap0 (i: path:
|
||||
{
|
||||
|
@ -69,6 +69,7 @@
|
|||
};
|
||||
ddns = {
|
||||
address = "10.1.0.31";
|
||||
port = 53;
|
||||
storage = "${storage}/ddns";
|
||||
};
|
||||
dns = {
|
||||
|
|
|
@ -7,6 +7,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
return 301 rtsp://${cfg.address}:${cfg.port}/live/main;
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location ~ ^/(settings/admin|settings/users|settings/apps|login|api) {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
proxy_pass http://''$${name}$request_uri;
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
proxy_pass http://''$${name}$request_uri;
|
||||
|
|
|
@ -30,6 +30,7 @@ in {
|
|||
|
||||
location / {
|
||||
# allow ${container.localAccess};
|
||||
# allow ${container.config.status.address};
|
||||
# allow ${container.config.vpn.address};
|
||||
# deny all;
|
||||
proxy_pass http://''$${name}$request_uri;
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
proxy_pass http://''$${name}$request_uri;
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
proxy_pass http://''$${name}$request_uri;
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
proxy_pass http://''$${name}$request_uri;
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
# allow ${container.localAccess};
|
||||
# allow ${container.config.status.address};
|
||||
# allow ${container.config.vpn.address};
|
||||
# deny all;
|
||||
add_header X-Forwarded-Proto https;
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
proxy_pass http://''$${name}$request_uri;
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
proxy_pass http://''$${name}$request_uri;
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
proxy_pass http://''$${name}$request_uri;
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
proxy_pass http://''$${name}$request_uri;
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
proxy_pass http://''$${name}$request_uri;
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
proxy_pass http://''$${name}$request_uri;
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
proxy_pass http://''$${name}$request_uri;
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
proxy_pass http://''$${name}$request_uri;
|
||||
|
|
|
@ -9,6 +9,7 @@ in {
|
|||
|
||||
location / {
|
||||
allow ${container.localAccess};
|
||||
allow ${container.config.status.address};
|
||||
allow ${container.config.vpn.address};
|
||||
deny all;
|
||||
|
||||
|
|
Loading…
Reference in a new issue