diff --git a/nixos/modules/services/web-apps/lemmy.nix b/nixos/modules/services/web-apps/lemmy.nix index c6889e2f4041..1f2168b2a4c6 100644 --- a/nixos/modules/services/web-apps/lemmy.nix +++ b/nixos/modules/services/web-apps/lemmy.nix @@ -117,7 +117,7 @@ in file_server } @for_backend { - path /api/* /pictrs/* feeds/* nodeinfo/* + path /api/* /pictrs/* /feeds/* /nodeinfo/* } handle @for_backend { reverse_proxy 127.0.0.1:${toString cfg.settings.port} diff --git a/nixos/tests/lemmy.nix b/nixos/tests/lemmy.nix index 5436d0b300cc..543bd2ce57a5 100644 --- a/nixos/tests/lemmy.nix +++ b/nixos/tests/lemmy.nix @@ -23,6 +23,13 @@ in hostname = "http://${lemmyNodeName}"; port = backendPort; database.createLocally = true; + # Without setup, the /feeds/* and /nodeinfo/* API endpoints won't return 200 + setup = { + admin_username = "mightyiam"; + admin_password = "ThisIsWhatIUseEverywhereTryIt"; + site_name = "Lemmy FTW"; + admin_email = "mightyiam@example.com"; + }; }; caddy.enable = true; }; @@ -76,7 +83,8 @@ in # No path can return 200 until after we upload an image to pict-rs assert_http_code("${lemmyNodeName}/pictrs/", 404) - # The paths `/feeds/*` and `/nodeinfo/*` are not tested because they seem to be misconfigured + assert_http_code("${lemmyNodeName}/feeds/all.xml", 200) + assert_http_code("${lemmyNodeName}/nodeinfo/2.0.json", 200) assert_http_code("${lemmyNodeName}/some-other-made-up-path/", 404, "-X POST") assert_http_code("${lemmyNodeName}/some-other-path", 404, "-H 'Accept: application/activity+json'")