Skip to content

Odd behaviour when connecting to an https backend #23

@craigedmunds

Description

@craigedmunds

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions