-
Notifications
You must be signed in to change notification settings - Fork 244
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
Cannot create new https.Agent() within axios.init() #31
Comments
Please see the newer approach using
import https from 'https'
export default({ axios }) {
axios.defaults.httpsAgent = new https.Agent({ rejectUnauthorized: false })
} https://github.com/nuxt-community/axios-module#extending-axios |
I had same issue and i tried the solution here but it didn't work for me. What worked for me was environment variable Also i think the variable should be |
Thank you, it works for me. |
Little update:
|
When using the
axios.init()
function withinnuxt.config.js
, creating a new https.Agent() is quite difficult.Importing https to be used constantly returns https is undefined.
https
will be undefined, and fail.Importing https within the
axios.init()
callback also fails.The text was updated successfully, but these errors were encountered: