Skip to content

How to configure 'proxyTable' and send a ‘https’ request ? #354

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

Closed
return1990 opened this issue Feb 16, 2017 · 1 comment
Closed

How to configure 'proxyTable' and send a ‘https’ request ? #354

return1990 opened this issue Feb 16, 2017 · 1 comment

Comments

@return1990
Copy link

// in /config/index.js
proxyTable: {
            '/api': {
                target: 'https://xxx.xxx.xxx.xxx:xxxx',
                changeOrigin: true,
                pathRewrite: {
                    '^/api': '/api'
                }
            }
 }

my host: http://localhost:8080
test server: https://xxx.xxx.xxx.xxx:xxxx

error is:

[HPM] Error occurred while trying to proxy request /api/xxx 
from localhost:8080 to https://xxx.xxx.xxx.xxx:xxxx (DEPTH_ZERO_SELF_SIGNED_CERT) 
(https://nodejs.org/api/errors.html#errors_common_system_errors)
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