changed login and logout to adapt to domain and added ToU
This commit is contained in:
+1
-2
@@ -2,7 +2,6 @@ import { Handlers } from "$fresh/server.ts";
|
||||
import { State } from "$root/routes/_middleware.ts";
|
||||
import { deleteCookie } from "$std/http/cookie.ts";
|
||||
|
||||
const SERVICE = "https://localhost/";
|
||||
const CAS = "https://ident.univ-amu.fr/cas";
|
||||
|
||||
// deno-lint-ignore no-explicit-any
|
||||
@@ -12,7 +11,7 @@ export const handler: Handlers<any, State> = {
|
||||
const headers = new Headers();
|
||||
|
||||
deleteCookie(headers, "sessionToken", { path: "/" });
|
||||
headers.set("Location", `${CAS}/logout?service=${SERVICE}`);
|
||||
headers.set("Location", `${CAS}/logout?service=${context.url.origin}`);
|
||||
|
||||
return new Response(null, {
|
||||
status: 302,
|
||||
|
||||
Reference in New Issue
Block a user