fix: handle headscale unavailability gracefully
This commit is contained in:
parent
e01fd8d50c
commit
1b45b0917f
9 changed files with 135 additions and 80 deletions
|
|
@ -13,15 +13,10 @@ import TextField from '~/components/TextField';
|
|||
import type { Key } from '~/types';
|
||||
import { loadContext } from '~/utils/config/headplane';
|
||||
import { pull } from '~/utils/headscale';
|
||||
import {
|
||||
startOidc,
|
||||
beginAuthFlow,
|
||||
getRedirectUri
|
||||
} from '~/utils/oidc';
|
||||
import { beginAuthFlow, getRedirectUri } from '~/utils/oidc';
|
||||
import { commitSession, getSession } from '~/utils/sessions.server';
|
||||
|
||||
export async function loader({ request }: LoaderFunctionArgs) {
|
||||
|
||||
const session = await getSession(request.headers.get('Cookie'));
|
||||
if (session.has('hsApiKey')) {
|
||||
return redirect('/machines', {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue