From 7cea188f742a0f972ddc6a3200a639a1f3ecd74e Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Tue, 14 Jan 2025 18:05:02 +0800 Subject: [PATCH] feat(ci): redirect_config for proxied domains --- tests/records.test.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/records.test.js b/tests/records.test.js index 8a1bbabbc3..2239713085 100644 --- a/tests/records.test.js +++ b/tests/records.test.js @@ -267,7 +267,13 @@ t("All files should have valid record types", (t) => { ); } if (data.redirect_config) { - t.true(recordKeys.includes("URL"), `${file}: Redirect config must be combined with a URL record`); + t.true( + recordKeys.includes("URL") || data.proxied, + `${file}: Redirect config must be combined with a URL record or the domain must be proxied` + ); + if (data.redirect_config.redirect_paths) { + t.true(recordKeys.includes("URL"), `${file}: redirect_config.redirect_paths requires a URL record`); + } } validateRecordValues(t, data, file);