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

Option to keep CORS headers in the response #75

rycus86 opened this issue Jul 22, 2019 · 1 comment


Copy link

commented Jul 22, 2019

We have noticed that CORS related headers, like Access-Control-Allow-Origin, are stripped out of the responses. When investigating, I found that the package's NewUpgradeAwareHandler does this on purpose, when the wrapTransport parameter is set to true - as is here in inlets.

Expected Behaviour

Our use-case would require keeping the CORS headers.

Current Behaviour

CORS headers are missing in the response coming back from the inlets server.

Possible Solution

Internally, we patched the latest inlets master to include a new server argument, --disable-transport-wrapping, that is off by default but when enabled, asks the proxy utility code to not wrap the transport and therefore keep the CORS headers. So far it's working fine, didn't find anything broken by this change, so I'd be happy to upstream it.

Your Environment

Tested with inlets 2.1.0

Let me know if you'd be open to having a flag like this, and I'll create a pull request.
Thank you!


This comment has been minimized.

Copy link

commented Jul 22, 2019

Thank you for your issue and I'm glad inlets is proving useful for you.

Please send the PR and add documentation for the flag.


rycus86 added a commit to rycus86/inlets that referenced this issue Jul 24, 2019

rycus86 added a commit to rycus86/inlets that referenced this issue Jul 24, 2019

@alexellis alexellis closed this in #77 Aug 4, 2019

alexellis added a commit that referenced this issue Aug 4, 2019

Add option to disable transport wrapping and keep CORS headers - fixes

Signed-off-by: Viktor Adam <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.