Closed vroad closed 5 years ago
This PR fixes #28. It adds an option to pass custom request handler in nuxt.config.js, which could be something like this:
require("dotenv").config(); const popsicle = require("popsicle"); // ... module.exports = { // ... oauth: { // ... request: (method, url, body, headers) => { return popsicle .get({ url: url, body: body, method: method, headers: headers, transport: popsicle.createTransport({ // reject self-signed certificates only on production environment rejectUnauthorized: process.env.ALLOW_INSECURE_OAUTH_ENDPOINT === "0" }) }) .then(function(res) { return { status: res.status, body: res.body }; }); } }, };
This PR fixes #28. It adds an option to pass custom request handler in nuxt.config.js, which could be something like this: