fix(frontend): replace expected-origin-boundary with middleware

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-09-02 19:11:16 +02:00
parent 94cf510736
commit 982bc4ba59
4 changed files with 77 additions and 61 deletions

View file

@ -7,7 +7,6 @@ import '../../../global-styles/index.scss'
import { ApplicationLoader } from '../../components/application-loader/application-loader'
import { BaseUrlContextProvider } from '../../components/common/base-url/base-url-context-provider'
import { FrontendConfigContextProvider } from '../../components/common/frontend-config-context/frontend-config-context-provider'
import { ExpectedOriginBoundary } from '../../components/layout/expected-origin-boundary'
import { StoreProvider } from '../../redux/store-provider'
import { extractBaseUrls } from '../../utils/base-url-from-env-extractor'
import React from 'react'
@ -20,16 +19,16 @@ export default async function RootLayout({ children }: { children: React.ReactNo
return (
<html lang='en'>
<body>
<ExpectedOriginBoundary expectedOrigin={baseUrls.renderer}>
<BaseUrlContextProvider baseUrls={baseUrls}>
<FrontendConfigContextProvider config={frontendConfig}>
<StoreProvider>
<ApplicationLoader>{children}</ApplicationLoader>
</StoreProvider>
</FrontendConfigContextProvider>
</BaseUrlContextProvider>
</ExpectedOriginBoundary>
<BaseUrlContextProvider baseUrls={baseUrls}>
<FrontendConfigContextProvider config={frontendConfig}>
<StoreProvider>
<ApplicationLoader>{children}</ApplicationLoader>
</StoreProvider>
</FrontendConfigContextProvider>
</BaseUrlContextProvider>
</body>
</html>
)
}
export const dynamic = 'force-dynamic'