mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-05 11:06:29 +00:00
Route server requests through local API
Use BASE_URL_API_LOCAL_SERVER for server-side data requests and load the layout session through the cached helper. Update production URLs to HTTPS and use 127.0.0.1 for local API endpoints.
This commit is contained in:
+2
-3
@@ -4,7 +4,7 @@ import 'react-lazy-load-image-component/src/effects/blur.css';
|
||||
import type { Metadata, Viewport } from 'next'
|
||||
import { Plus_Jakarta_Sans } from 'next/font/google'
|
||||
|
||||
import { getServerSession } from 'next-auth'
|
||||
import { getCacheServerSession } from '@/lib/get-access-data'
|
||||
|
||||
import { ThemeProvider } from '@/providers/ThemeProvider'
|
||||
import SessionProvider from '@/providers/SessionProvider'
|
||||
@@ -13,7 +13,6 @@ import AntdConfigProvider from '@/providers/AntdConfigProvider';
|
||||
import ProgressBarProviders from '@/providers/ProgressBarProvider';
|
||||
import { TooltipProvider } from '@/components/ui/tooltip';
|
||||
import ServiceWorkerRegister from '@/components/pwa/ServiceWorkerRegister';
|
||||
import { authOptions } from '@/lib/auth';
|
||||
|
||||
|
||||
const jakarta = Plus_Jakarta_Sans({ subsets: ['latin'] })
|
||||
@@ -99,7 +98,7 @@ export default async function RootLayout({
|
||||
// FOR INSECURE SSL (ex: Self Signed Certificates)
|
||||
// process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
|
||||
|
||||
const session = await getServerSession(authOptions)
|
||||
const session = await getCacheServerSession()
|
||||
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
|
||||
Reference in New Issue
Block a user