File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { UserPreferencesSync } from "@/components/user-preferences-sync"
66import { ToolVisibilityPreferencesSync } from "@/components/tool-visibility-preferences-sync"
77import { PinnedToolsPreferencesSync } from "@/components/pinned-tools-preferences-sync"
88import { AppUpdateNotifier } from "@/components/app-update-notifier"
9+ import { AuthLogoutListener } from "@/components/auth-logout-listener"
910
1011const GlobalCommandPalette = dynamic (
1112 ( ) => import ( '@/components/global-command-palette' ) . then ( ( m ) => m . GlobalCommandPalette ) ,
@@ -35,6 +36,7 @@ export function ClientShell({ children }: Props) {
3536 < ToolVisibilityPreferencesSync />
3637 < PinnedToolsPreferencesSync />
3738 < AppUpdateNotifier />
39+ < AuthLogoutListener />
3840 < Suspense fallback = { null } >
3941 < GlobalCommandPalette />
4042 </ Suspense >
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import {
2121 IconRefresh ,
2222} from '@tabler/icons-react' ;
2323import { cn } from '@/lib/utils' ;
24+ import { backendFetch } from '@/lib/backend-auth' ;
2425
2526interface DNSRecord {
2627 type : string ;
@@ -205,8 +206,7 @@ export function DnsLookupLayout() {
205206 try {
206207 const params = new URLSearchParams ( { domain : target } ) ;
207208 selectedTypes . forEach ( rt => params . append ( 'record_types' , rt ) ) ;
208- const res = await fetch ( `/api/backend/dns-lookup/lookup?${ params } ` , {
209- credentials : 'include' ,
209+ const res = await backendFetch ( `/api/backend/dns-lookup/lookup?${ params } ` , {
210210 headers : { accept : 'application/json' } ,
211211 } ) ;
212212 if ( ! res . ok ) {
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { cn } from "@/lib/utils";
1010import useAuth from "@/utils/useAuth" ;
1111import { SidebarMenu , SidebarMenuButton , SidebarMenuItem } from "@/components/ui/sidebar" ;
1212import { usePathname } from "next/navigation" ;
13+ import { backendFetch } from "@/lib/backend-auth" ;
1314
1415type FeedbackType = "bug" | "feature" | "general" ;
1516
@@ -26,10 +27,9 @@ async function submitFeedback(payload: {
2627 email : string | null ;
2728 page : string ;
2829} ) {
29- const res = await fetch ( "/api/backend/feedback" , {
30+ const res = await backendFetch ( "/api/backend/feedback" , {
3031 method : "POST" ,
3132 headers : { "Content-Type" : "application/json" } ,
32- credentials : "include" ,
3333 body : JSON . stringify ( payload ) ,
3434 } ) ;
3535 if ( ! res . ok ) {
You can’t perform that action at this time.
0 commit comments