Sitecore JSS Uses Underscores in Headers - Configure ingress-nginx To Accept Them

Hit this issue where requests were failing through ingress-nginx in a Kuberetes cluster for requests to a Sitecore JSS site. This actual is documented in Sitecore’s documentation, but in the Managed Cloud documentation and for an older version. Hoping this gets better Google-iness for someone else who runs into this.

Sitecore JSS uses underscores in the headers it returns! If you’re using ingress-nginx, allowing for underscores in headers is not enabled by default and can cause some weirdness. You need to enable this in the ConfigMap for your ingress-nginx instance. Documentation to do so can be found here: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#enable-underscores-in-headers