Skip to content

Some https proxy urls failed #4322

Closed
Closed
@doggy8088

Description

@doggy8088

OS?

Windows 10

Versions.

angular-cli: 1.0.0-beta.26
node: 7.5.0
os: win32 x64

Repro steps.

  1. git clone https://github.com/doggy8088/angular-cli-https-proxy-error.git
  2. cd angular-cli-https-proxy-error
  3. npm install
  4. npm start
  5. Open 'http://localhost:4200/_/help' ( this should proxy request to https://jsonbin.org/_/help )
  • The page output will be Erroroccured while trying to proxy to: localhost:4200/_/help.
  • The console output will be [HPM] Error occurred while trying to proxy request /_/help from localhost:4200 to https://jsonbin.org (EPROTO) (https://nodejs.org/api/errors.html#errors_common_system_errors).

The log given by the failure.

[HPM] Error occurred while trying to proxy request /_/help from localhost:4200 to https://jsonbin.org (EPROTO) (https://nodejs.org/api/errors.html#errors_common_system_errors)

Some useful details

I tested some https webiste without any proxy request problem. Don't know why I just can't proxy my https request to https://jsonbin.org website. I need to proxy my API request to that domain.

I want to log more detail about the error. I was trying to edit the node_modules\http-proxy-middleware\lib\index.js file for Line 145 shown as below to show the err message.

logger.error('[HPM] Error occurred while trying to proxy request %s from %s to %s (%s) (%s)', req.url, hostname, target, err.code, err);

Here is the error output:

[HPM] Error occurred while trying to proxy request /_/help from localhost:4200 to https://jsonbin.org (EPROTO) (Error: write EPROTO 101057795:error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error:openssl\ssl\s23_clnt.c:769:
)

I do can browse all these urls by browser or can send request directly from Postman. It just can't send requests to some https urls from angular-cli proxy feature.

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