fix: don't change scheme on redirect (#1024)
Fixes #1015 This scenario can happen when a user has a proxy sitting in front of Fresh, that does TLS termination, while Fresh is running on plain text HTTP. --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
This commit is contained in:
co-authored by
Asher Gomez
parent
1a456444e4
commit
f95f7586f5
+3
-3
@@ -199,7 +199,7 @@ Deno.test("redirect /pages/fresh/ to /pages/fresh", async () => {
|
||||
assertEquals(resp.status, Status.TemporaryRedirect);
|
||||
assertEquals(
|
||||
resp.headers.get("location"),
|
||||
"https://fresh.deno.dev/pages/fresh",
|
||||
"/pages/fresh",
|
||||
);
|
||||
});
|
||||
|
||||
@@ -211,7 +211,7 @@ Deno.test("redirect /pages/////fresh///// to /pages/////fresh", async () => {
|
||||
assertEquals(resp.status, Status.TemporaryRedirect);
|
||||
assertEquals(
|
||||
resp.headers.get("location"),
|
||||
"https://fresh.deno.dev/pages/////fresh",
|
||||
"/pages/////fresh",
|
||||
);
|
||||
});
|
||||
|
||||
@@ -223,7 +223,7 @@ Deno.test("redirect /pages/////fresh/ to /pages/////fresh", async () => {
|
||||
assertEquals(resp.status, Status.TemporaryRedirect);
|
||||
assertEquals(
|
||||
resp.headers.get("location"),
|
||||
"https://fresh.deno.dev/pages/////fresh",
|
||||
"/pages/////fresh",
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user