Commit graph

8 commits

Author SHA1 Message Date
Moritz Marquardt
18d09a163c Use hashicorp's LRU cache for DNS & certificates
DNS caching is also limited to 30 seconds now instead of 5 minutes
2024-04-18 19:07:34 +02:00
Moritz Marquardt
7694deec83 Fix missing return on redis parsing issues
Suggested-By: Gusted (https://codeberg.org/Codeberg/pages-server/pulls/301/files#issuecomment-1732054)
2024-04-18 19:07:34 +02:00
Moritz Marquardt
5bf538c5ec Format go code 2024-04-18 19:07:34 +02:00
Moritz Marquardt
46c8daacba Move redis config to CacheConfig struct, add cache prefixes & trace logging 2024-04-18 19:07:34 +02:00
Moritz Marquardt
e1a22d5f4c Make it possible to actually use redis for caching through the config flags 2024-04-18 19:07:34 +02:00
Moritz Marquardt
c4181d1206 Move to []byte for caching and make it compile 2024-04-18 19:07:34 +02:00
Jean-Marie 'Histausse' Mineau
03881382a4 Add option to disable DNS ACME provider (#290)
This PR add the `$NO_DNS_01` option (disabled by default) that removes the DNS ACME provider, and replaces the wildcard certificate by individual certificates obtained using the TLS ACME provider.

This option allows an instance to work without having to manage access tokens for the DNS provider. On the flip side, this means that a certificate can be requested for each subdomains. To limit the risk of DOS, the existence of the user/org corresponding to a subdomain is checked before requesting a cert, however, this limitation is not enough for an forge with a high number of users/orgs.

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/290
Reviewed-by: Moritz Marquardt <momar@noreply.codeberg.org>
Co-authored-by: Jean-Marie 'Histausse' Mineau <histausse@protonmail.com>
Co-committed-by: Jean-Marie 'Histausse' Mineau <histausse@protonmail.com>
2024-04-18 17:05:20 +00:00
crapStone
7e80ade24b Add config file and rework cli parsing and passing of config values (#263)
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/263
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: crapStone <me@crapstone.dev>
Co-committed-by: crapStone <me@crapstone.dev>
2024-02-15 16:08:29 +00:00