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

Access via HTTPS not working #45

Open
httpsUser opened this issue Nov 22, 2017 · 1 comment
Open

Access via HTTPS not working #45

httpsUser opened this issue Nov 22, 2017 · 1 comment

Comments

@httpsUser
Copy link

httpsUser commented Nov 22, 2017

Even though you are able to set the port to 443, the plain use of this package wont work via HTTPS, because the XMLRPC-Client is only invoked with "isSecure" false.

Quick fix by exchanging the client yourself:

var xmlrpc = require('xmlrpc'); // for Magento 1.9 https fix
const Magento1 = require('magento');
var magento = new Magento1({
  host: 'your.host',
  port: 443,
  path: '/api/xmlrpc/',
  login: 'your_username',
  pass: 'your_pass'
});
var isSecure = true;
// IMPORTANT FIX: for https to work, exchange client
if (isSecure) {
    magento.client = xmlrpc.createSecureClient(magento.config);
}
@LiamKarlMitchell
Copy link

Please merge the pull request #35

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

2 participants