Compare commits
2 commits
897c1f57a8
...
c7557fdef9
Author | SHA1 | Date | |
---|---|---|---|
Antoine Martin | c7557fdef9 | ||
Antoine Martin | a116894bba |
|
@ -76,6 +76,7 @@ in {
|
||||||
proxy_read_timeout 600;
|
proxy_read_timeout 600;
|
||||||
proxy_send_timeout 600;
|
proxy_send_timeout 600;
|
||||||
client_max_body_size 100m;
|
client_max_body_size 100m;
|
||||||
|
access_log syslog:server=unix:/dev/log,tag=photoprism;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -90,5 +91,23 @@ in {
|
||||||
"${cfg.home}/storage"
|
"${cfg.home}/storage"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.fail2ban.jails = {
|
||||||
|
photoprism = ''
|
||||||
|
enabled = true
|
||||||
|
filter = photoprism-failed-login
|
||||||
|
port = http,https
|
||||||
|
maxretry = 3
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc = {
|
||||||
|
"fail2ban/filter.d/photoprism-failed-login.conf".text = ''
|
||||||
|
[Definition]
|
||||||
|
failregex = ^<HOST> -.*"POST \/api\/v1\/session HTTP[^"]*" 400 .*$
|
||||||
|
ignoreregex =
|
||||||
|
journalmatch = _SYSTEMD_UNIT=nginx.service
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue