From adbd9d8d1e17d5909ad621e1ac43933b9bb16f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=E2=80=9CNiols=E2=80=9D=20Jeannerod?= Date: Wed, 30 Oct 2024 19:44:07 +0000 Subject: [PATCH] Fix Mastodon/Garage test --- services/tests/mastodon-garage.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/tests/mastodon-garage.nix b/services/tests/mastodon-garage.nix index 2a7d177..5111b61 100644 --- a/services/tests/mastodon-garage.nix +++ b/services/tests/mastodon-garage.nix @@ -126,8 +126,8 @@ pkgs.nixosTest { raise Exception("mastodon did not send a content security policy header") csp = csp_match.group(1) # the img-src content security policy should include the garage server - ## TODO: use `nodes.server.fediversity.internal.garage.api.url` same as above, but beware of escaping the regex. - garage_csp = re.match(".*; img-src[^;]*web\.garage\.localhost:3902.*", csp) + ## TODO: use `nodes.server.fediversity.internal.garage.api.url` same as above, but beware of escaping the regex. Be careful with port 80 though. + garage_csp = re.match(".*; img-src[^;]*web\.garage\.localhost.*", csp) if garage_csp is None: raise Exception("Mastodon's content security policy does not include garage server. image will not be displayed properly on mastodon.")