debug: csrf cookie
This commit is contained in:
parent
6e802d2402
commit
1ec5b2f09c
3 changed files with 3 additions and 2 deletions
|
|
@ -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' }));
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue