debug: csrf cookie

This commit is contained in:
nihonium 2025-12-04 12:34:56 +03:00
parent 6e802d2402
commit 1ec5b2f09c
Signed by: nihonium
GPG key ID: 0251623741027CFC
3 changed files with 3 additions and 2 deletions

View file

@ -13,4 +13,4 @@ import type { ClientOptions as ClientOptions2 } from './types.gen';
*/
export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
export const client = createClient(createConfig<ClientOptions2>({ baseUrl: '/api/v1' }));
export const client = createClient(createConfig<ClientOptions2>({ baseUrl: 'http://10.1.0.65:8081/api/v1' }));

View file

@ -20,7 +20,7 @@ export type OpenAPIConfig = {
};
export const OpenAPI: OpenAPIConfig = {
BASE: '/auth',
BASE: 'http://10.1.0.65:8081/auth',
VERSION: '1.0.0',
WITH_CREDENTIALS: false,
CREDENTIALS: 'include',

View file

@ -23,6 +23,7 @@ const STATUS_BUTTONS: { status: UserTitleStatus; icon: React.ReactNode; label: s
export function TitleStatusControls({ titleId }: { titleId: number }) {
const [cookies] = useCookies(['xsrf_token']);
const xsrfToken = cookies['xsrf_token'] || null;
console.log("xsrf_token: " + xsrfToken)
const [currentStatus, setCurrentStatus] = useState<UserTitleStatus | null>(null);
const [loading, setLoading] = useState(false);