Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS headers not added on 504 gateway timeout #2134

Closed
rocketraman opened this issue Feb 23, 2018 · 0 comments · Fixed by #2140
Closed

CORS headers not added on 504 gateway timeout #2134

rocketraman opened this issue Feb 23, 2018 · 0 comments · Fixed by #2140

Comments

@rocketraman
Copy link

rocketraman commented Feb 23, 2018

Is this a request for help? No

What keywords did you search in NGINX Ingress controller issues before filing this one? cors 504 gateway timeout


Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

NGINX Ingress controller version: 0.11.0

Kubernetes version (use kubectl version):

Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T08:56:23Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

Environment:

  • Cloud provider or hardware configuration: Azure acs-engine
  • OS (e.g. from /etc/os-release):
NAME="Ubuntu"
VERSION="16.04.2 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.2 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
  • Kernel (e.g. uname -a): Linux k8s-master-18117938-0 4.4.0-104-generic #127-Ubuntu SMP Mon Dec 11 12:16:42 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: acs-engine
  • Others:

What happened:

I have an ingress service with CORs enabled. When the ingress upstream does not respond for some reason, the nginx controller returns a 504 gateway timeout as expected. However, the 504 timeout does not contain the required CORs headers to allow the browser code to read the error response.

What you expected to happen:

The 504 error should contain the requested CORS headers.

How to reproduce it (as minimally and precisely as possible):

Create a service that does nothing with the request, to cause a gateway timeout. Configure the ingress with any CORs rules, and enable CORs. Try to make the request.

Anything else we need to know: No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant