Merge pull request #287 from lorenzomigliorero/fix/remove-path-prefix

feat: keep path prefix only if different than /
This commit is contained in:
Mauricio Siu
2024-07-31 21:00:28 -06:00
committed by GitHub
2 changed files with 12 additions and 1 deletions

View File

@@ -88,6 +88,17 @@ test("Web entrypoint on http domain", async () => {
);
expect(router.middlewares).not.toContain("redirect-to-https");
expect(router.rule).not.toContain("PathPrefix");
});
test("Web entrypoint on http domain with custom path", async () => {
const router = await createRouterConfig(
baseApp,
{ ...baseDomain, path: "/foo", https: false },
"web",
);
expect(router.rule).toContain("PathPrefix(`/foo`)");
});
test("Web entrypoint on http domain with redirect", async () => {