Merged PR 2351: fix csp by making it server side

Related work items: #23447
This commit is contained in:
Robert Bond
2026-05-28 10:41:11 +00:00
parent 24cd7000f7
commit 3f2b8807e7
5 changed files with 34 additions and 35 deletions
+10 -6
View File
@@ -15,9 +15,10 @@ import Footer from "../components/footer";
import Header from "../components/header";
import Search from "../components/search";
import { setAppealType, setProjectType } from "../store/appealType/action";
import { setLPA } from "../store/lpa/action";
import { setLPA, setCaseStatus } from "../store/lpa/action";
import { wrapper } from "../store/store";
import ServiceBanner from "../components/servicebanner";
import { getCaseStatus } from "../actions/services/caseDirectService";
const Home = (props) => {
const { footerLinks, pages } = props;
@@ -127,11 +128,13 @@ const Home = (props) => {
export const getServerSideProps = wrapper.getServerSideProps(
(store) =>
async ({ query, req, res }) => {
let [appealTypeData, projectTypeData, lpaData] = await Promise.all([
await getAppealsTypes(),
await getProjectTypes(),
await getLPA()
]);
let [appealTypeData, projectTypeData, lpaData, caseStatusObj] =
await Promise.all([
await getAppealsTypes(),
await getProjectTypes(),
await getLPA(),
await getCaseStatus()
]);
//const lpaData = require("../data/lpa.json");
//const appealTypeData = require("../data/appealtypes.json");
@@ -139,6 +142,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
store.dispatch(setAppealType(appealTypeData));
store.dispatch(setProjectType(projectTypeData));
store.dispatch(setLPA(lpaData));
store.dispatch(setCaseStatus(caseStatusObj));
}
);