contentacms / contentajs

A nodejs server that proxies to Contenta CMS and holds custom code.
MIT License
102 stars 25 forks source link

Issue with got #36

Open Sifhab opened 4 years ago

Sifhab commented 4 years ago

Hello,

Some possibility have been remove from got.

  1. You can't now use :

    json: true

    ('in your got.js file). responseType: 'json' do the job.

  2. The query : {query: JSON.stringify(request)} (in ContentaJsonRpc.js) doesn't seem to work . It's ok with searchParams: {query: JSON.stringify(request)} .

++

e0ipso commented 4 years ago

Thanks for looking into that. Any chance you can create a PR?

Sifhab commented 4 years ago

Yeps

I had an other issue with the entry point http://Proxy.domain/api . The http-proxy make a request to Drupal at http://domain.Drupal/api/ ( the / is the annoying part) ; so Drupal respond with a 301 and send a redirection to http://Drupal.domain/api . I have made some modification in ./routes/proxyHandler.js and that seems solve for me.