Kubernetes nginx-ingress ingress controller CORS handled by application Kubernetes nginx-ingress ingress controller CORS handled by application kubernetes kubernetes

Kubernetes nginx-ingress ingress controller CORS handled by application


So this was actually related to a few other issues I was having. CORS headers were not being stripped after all. I had suspicions that the CORS module wasnt configured in a typical IIS container after doing a significant amount of debugging. This was the first issue. https://github.com/microsoft/dotnet-framework-docker/issues/625

For those that are interested here is the DockerFile lines for adding in CORS with Chocolatey:

RUN Set-ExecutionPolicy Bypass -Scope Process -Force; `    [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; `    iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); `    choco install iis-cors-module -y

The Kubernetes NGINX wasnt stripping headers and was indeed proxying all headers as normal.

A few other interesting tidbits if anyone else experiences similar issues in future: