From aff0f43da393ed058704afd40112adf5259c5e28 Mon Sep 17 00:00:00 2001 From: Andreas Bernacca Date: Tue, 5 Nov 2024 18:08:12 +0100 Subject: [PATCH] Fix issue where metadata was not being sent to frontend --- CHANGELOG.md | 1 + {{cookiecutter.project_name}}/frontend/app/[...path]/page.js | 3 ++- {{cookiecutter.project_name}}/frontend/app/page.js | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 576802114..4ab17d7e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added ### Changed ### Fixed +- Fix issue where metadata was not being sent to frontend correctly - Fix 'the input device is not a TTY' error in pre-push githook - Make sure host query arg are supported when loading redirects from api - Replace deprecated ruff lint options diff --git a/{{cookiecutter.project_name}}/frontend/app/[...path]/page.js b/{{cookiecutter.project_name}}/frontend/app/[...path]/page.js index 40594e729..9d15b7d56 100644 --- a/{{cookiecutter.project_name}}/frontend/app/[...path]/page.js +++ b/{{cookiecutter.project_name}}/frontend/app/[...path]/page.js @@ -1,3 +1,4 @@ -import CatchAllPage from '../page'; +import CatchAllPage, { generateMetadata } from '../page'; +export { generateMetadata }; export default CatchAllPage; diff --git a/{{cookiecutter.project_name}}/frontend/app/page.js b/{{cookiecutter.project_name}}/frontend/app/page.js index be5ba3da5..0b9554e23 100644 --- a/{{cookiecutter.project_name}}/frontend/app/page.js +++ b/{{cookiecutter.project_name}}/frontend/app/page.js @@ -147,6 +147,9 @@ export async function generateMetadata({ params, searchParams }, parent) { searchParams: { host: headersList.get('host'), }, + headers: { + cookie: headersList.get('cookie'), + }, options: { //cache: 'force-cache', revalidate: 900, // 15 minutes