Static GitHub Issues

[2934] Server-side HTTPs requests to API fail: 'sslv3 alert handshake failure'

prev: RangeError: Array size is not a small enough positive integer on iOS browsers after now deploy
next: Dynamic route without index file

I'm building a Nuxt application utilising server-side rendering and a Vuex connecting to an external API. I want to fill my store with some data on application start - on (re)load basically - right now it only fetches data when you navigate to one of the pages using the internal links of the application. SSR isn't working as well.

So I'm trying to use nuxtServerInit in index.js (I'm using Vuex modules) and dispatch an action to one of my store modules. The axios request causes an error however: SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure, this error doesn't occur when axios does the same request from the client-side.

I think I've narrowed it down to this node https issue. When I run a plain Node https request from nuxtServerInit I get the error, but when I append 'ecdhCurve' : 'auto' to the request options the request resolves normally. Is it possible to configure Nuxt to automatically append the option to all https request of my application, or is that bad practice and is the API server I'm connecting to at fault here?

This fails:

    const request = https.get({
      hostname: 'api.example.com',
      path: '/my/endpoint'
    })

This works:

    const request = https.get({
      hostname: 'api.example.com',
      path: '/my/endpoint',
      ecdhCurve: 'auto'
    })

I'm running Node v9.6.1 (Homebrew version, but it fails on a Linux box as well with v9.5.0) and Nuxt 1.4.0.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2545">#c2545</a>)</em></sub></div>