0

I want to use Sitecore JSS on Sitecore which is on Azure. I have installed the package. However, getting 404 all the time.

enter image description here

I don't want to make GraphQL end point as public but need to access in NextJs app on static web app in Azure.

Please give me steps

1
  • Do you have * value for the Allowed Controller inside the API Key item?
    – ckhanna
    Commented Aug 16 at 17:09

1 Answer 1

0

It looks like the issue is with the site parameter in your query. The site parameter needs to match a configured site in your sites.config file. For example:

<site name="corporate"
      inherits="website"
      language="en"
      contentLanguage="en"
      scheme="https"
      rootPath="/sitecore/content/CorporateSite"
      dictionaryPath="/sitecore/content/CorporateSite/Dictionary"
      dictionaryCacheSize="100MB"
      dictionaryCacheLifetime="86400"
      startItem="/Home"
      cacheHtml="false"
      hostName="corporate.localhost"
      targetHostName="corporate.localhost"
      database="master" />

Make sure the site name in your query (for example, "corporate") exactly matches the name attribute in your sites.config. If there’s any mismatch, Sitecore won’t be able to resolve the site, which can lead to errors like the 400 status code you encountered.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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