I followed the steps on https://jss.sitecore.com/docs/client-frameworks/getting-started/app-deployment to get my local starter app connected to my local sitecore install.

In the nextjs app it works fine, but in the experience editor I was getting a strange error: "A potentially dangerous Request.Path value was detected from the client (:)"

While debugging the error in nextjs I saw a strange value in the itemPath: enter image description here This all happens in this file: node_modules\@sitecore-jss\sitecore-jss-nextjs\dist\cjs\middleware\editing-render-middleware.js

As a hack I replaced the "https://https" in the return:

enter image description here

Now it works fine in the exp editor, but I assume I must have something not configured right.

Does anyone have an idea what's wrong here?

  • Welcome to sitecore stack exchange. How is your hostname configured in the config of the app? Do you have one set or have it as the default one? Mar 10 '21 at 17:10
  • why is it even 2 https in your request? it should be 1 Mar 11 '21 at 2:50
  • @CristiVulturar Yes, this is in my configuration: <app name="jss-nextjs-app" sitecorePath="/sitecore/content/jss-nextjs-app" graphQLEndpoint="/sitecore/api/graph/edge" inherits="defaults" serverSideRenderingEngine="http" serverSideRenderingEngineEndpointUrl="localhost:3000/api/editing/render" serverSideRenderingEngineApplicationUrl="localhost:3000" /> In my .env file the reference to sitecore is made with this line I believe: SITECORE_API_HOST=jsssandbox.sc
    – erwin_smit
    Mar 11 '21 at 8:00
  • @MaheshRaghupathi I know it should be one, that's why I got the temporarily hack in place...
    – erwin_smit
    Mar 11 '21 at 8:00

The problem was the configuration of the hostname:

https://jsssandbox.sc should've been jsssandbox.sc It works like a charm now!

Not the answer you're looking for? Browse other questions tagged or ask your own question.