Skip to content

Commit

Permalink
add hostname to response header
Browse files Browse the repository at this point in the history
  • Loading branch information
idan committed Aug 26, 2024
1 parent 3eda138 commit c0c883e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import type { Handle } from "@sveltejs/kit";

export const handle: Handle = async ({ event, resolve }) => {
event.setHeaders({ 'Arr-Disable-Session-Affinity': 'true' });
event.setHeaders({ 'X-My-Hostname-Is': event.url.hostname });
event.cookies.set('testcookie', 'testcookie', {
path: '/',
maxAge: 31536000000,
sameSite: "lax",
httpOnly: false,
domain: event.url.hostname,
});
return await resolve(event);
};

0 comments on commit c0c883e

Please sign in to comment.