Merged PR 1259: added 127 ip to csp to check for fix to app error
added 127 ip to csp to check for fix to app error Related work items: #12406
This commit is contained in:
@@ -2,7 +2,7 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Field, reduxForm } from "redux-form";
|
import { Field, reduxForm, SubmissionError } from "redux-form";
|
||||||
import { sendGAEvent } from "@next/third-parties/google";
|
import { sendGAEvent } from "@next/third-parties/google";
|
||||||
|
|
||||||
const required = (errorMsg) => (value) =>
|
const required = (errorMsg) => (value) =>
|
||||||
@@ -84,14 +84,22 @@ let CaseSearch = (props) => {
|
|||||||
// };
|
// };
|
||||||
|
|
||||||
const onHandleSubmit = (values) => {
|
const onHandleSubmit = (values) => {
|
||||||
// spinnerState();
|
if (Object.keys(values).length === 0) {
|
||||||
router.replace({
|
console.log(props.error);
|
||||||
pathname:
|
|
||||||
router.locale == "cy"
|
throw new SubmissionError({
|
||||||
? "/canlyniadauchwilio"
|
basicSearch: t("home:casesearch-search-validation-required"),
|
||||||
: "/searchresults",
|
_error: "required",
|
||||||
query: { q: values.basicSearch.trim() },
|
});
|
||||||
});
|
} else {
|
||||||
|
router.push({
|
||||||
|
pathname:
|
||||||
|
router.locale == "cy"
|
||||||
|
? "/canlyniadauchwilio"
|
||||||
|
: "/searchresults",
|
||||||
|
query: { q: values.basicSearch },
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
+1
-1
@@ -42,7 +42,7 @@ class MyDocument extends Document {
|
|||||||
csp += `form-action 'self' ` + process.env.NEXTAUTH_URL + ` ;`;
|
csp += `form-action 'self' ` + process.env.NEXTAUTH_URL + ` ;`;
|
||||||
csp += `object-src 'self' data:;`;
|
csp += `object-src 'self' data:;`;
|
||||||
csp += `default-src 'self' https://www.google-analytics.com;`;
|
csp += `default-src 'self' https://www.google-analytics.com;`;
|
||||||
csp += `connect-src 'self' https://ukwest-0.in.applicationinsights.azure.com https://js.monitor.azure.com https://region1.google-analytics.com;`;
|
csp += `connect-src 'self' http://127.0.0.1 https://ukwest-0.in.applicationinsights.azure.com https://js.monitor.azure.com https://region1.google-analytics.com;`;
|
||||||
csp += `script-src 'self' 'unsafe-eval' 'unsafe-inline' https://ukwest-0.in.applicationinsights.azure.com https://region1.google-analytics.com https://www.google-analytics.com/ https://tagmanager.google.com/ https://www.googletagmanager.com/;`;
|
csp += `script-src 'self' 'unsafe-eval' 'unsafe-inline' https://ukwest-0.in.applicationinsights.azure.com https://region1.google-analytics.com https://www.google-analytics.com/ https://tagmanager.google.com/ https://www.googletagmanager.com/;`;
|
||||||
csp += `style-src 'self' 'unsafe-inline' https://pro.fontawesome.com/ https://www.google-analytics.com https://tagmanager.google.com/ https://www.googletagmanager.com/ https://fonts.googleapis.com/;`;
|
csp += `style-src 'self' 'unsafe-inline' https://pro.fontawesome.com/ https://www.google-analytics.com https://tagmanager.google.com/ https://www.googletagmanager.com/ https://fonts.googleapis.com/;`;
|
||||||
csp += `img-src 'self' 'unsafe-inline' https://www.gov.wales https://gov.wales https://fonts.gstatic.com https://www.googletagmanager.com https://www.google-analytics.com https://ssl.gstatic.com/ blob: data:;`;
|
csp += `img-src 'self' 'unsafe-inline' https://www.gov.wales https://gov.wales https://fonts.gstatic.com https://www.googletagmanager.com https://www.google-analytics.com https://ssl.gstatic.com/ blob: data:;`;
|
||||||
|
|||||||
Reference in New Issue
Block a user