added 127 ip to csp to check for fix to app error
This commit is contained in:
@@ -2,7 +2,7 @@ import useTranslation from "next-translate/useTranslation";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
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";
|
||||
|
||||
const required = (errorMsg) => (value) =>
|
||||
@@ -84,14 +84,22 @@ let CaseSearch = (props) => {
|
||||
// };
|
||||
|
||||
const onHandleSubmit = (values) => {
|
||||
// spinnerState();
|
||||
router.replace({
|
||||
pathname:
|
||||
router.locale == "cy"
|
||||
? "/canlyniadauchwilio"
|
||||
: "/searchresults",
|
||||
query: { q: values.basicSearch.trim() },
|
||||
});
|
||||
if (Object.keys(values).length === 0) {
|
||||
console.log(props.error);
|
||||
|
||||
throw new SubmissionError({
|
||||
basicSearch: t("home:casesearch-search-validation-required"),
|
||||
_error: "required",
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
pathname:
|
||||
router.locale == "cy"
|
||||
? "/canlyniadauchwilio"
|
||||
: "/searchresults",
|
||||
query: { q: values.basicSearch },
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ class MyDocument extends Document {
|
||||
csp += `form-action 'self' ` + process.env.NEXTAUTH_URL + ` ;`;
|
||||
csp += `object-src 'self' data:;`;
|
||||
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 += `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:;`;
|
||||
|
||||
Reference in New Issue
Block a user