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

Odd behaviour when connecting to an https backend #23

Open
craigedmunds opened this issue Sep 15, 2016 · 0 comments
Open

Odd behaviour when connecting to an https backend #23

craigedmunds opened this issue Sep 15, 2016 · 0 comments

Comments

@craigedmunds
Copy link

craigedmunds commented Sep 15, 2016

I'm attempting to create a proxy to an https API that sits behind Cloudflare:

http.createServer(yakbak('https://--domain--', {
dirname: __dirname + '/tapes'
})).listen(3000);

When I do this, and curl the proxy:

curl -i localhost:3000/status

I get an error from cloudflare "The request's Host header does not match the request's TLS SNI Host header."

I've got a code change for the proxy to fix this; updating the headers collection prior to mod.request rather than using preq.setHeader('Host', uri.host), and this fixes it, but wasn't able to reproduce it with a test.

craigedmunds added a commit to flyvictor/yakbak that referenced this issue Sep 15, 2016
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

No branches or pull requests

1 participant