I'm running in connected mode on my local and I want to disable SSL cert validation. According to the Sitecore docs, this option is mentioned:
... in the SSR application jss-proxy-ssr, in the config.js file, in the proxyOptions object, you can disable SSL validation entirely by setting the secure to false option. For example:
proxyOptions: {
// Setting this to false will disable SSL certificate validation
// when proxying to a SSL Sitecore instance.
// This is a major security issue, so NEVER EVER set this to false
// outside local development. Use a real CA-issued certificate.
// NEVER EVER do this in production. It will make your SSL completely insecure.
secure: false
}
It's not clear how to actually do this. I started by searching for proxyOptions
in the JSS repo. I looked into making the change in bootstrap.ts
via the configOverride
var, but it's only a simple list of key value pairs which doesn't appear to support tunnelling into ProxyConfig.proxyOptions.secure
:
const configOverride: { [key: string]: string } = {};
npm run start:connected
which corresponds to scriptnpm-run-all --serial bootstrap --parallel next:dev start:watch-components
. The use case is that I want to avoid uploading the certificate in the node store. Experience editor is running onhttps://sitecore10u2.sc
and the front end is running onhttp://localhost:3000
. I haveNODE_TLS_REJECT_UNAUTHORIZED=0
, as recommended here (getfishtank.ca/blog/next-build-certificate-error-sitecore), but I still experience SSL issues.