Fix: don't check https
This commit is contained in:
+8
-1
@@ -2,11 +2,17 @@ import axios from "axios";
|
||||
import { fetchAnswerFailure } from "../actions/answer";
|
||||
import setAuthorizationHeader from "./setAuthorizationHeader";
|
||||
import Router from 'next/router';
|
||||
|
||||
var https = require('https');
|
||||
|
||||
//axios.defaults.headers.common = { 'X-Requested-With': 'XMLHttpRequest' }
|
||||
axios.defaults.baseURL = (process.env.NODE_ENV !== 'production') ?
|
||||
'http://localhost/app_dev.php/' :
|
||||
process.env.SERVER_URL;
|
||||
|
||||
const httpsAgent = new https.Agent({ rejectUnauthorized: false });
|
||||
axios.defaults.httpsAgent = httpsAgent;
|
||||
|
||||
axios.interceptors.response.use(response => {
|
||||
return response;
|
||||
}, error => {
|
||||
@@ -18,6 +24,7 @@ axios.interceptors.response.use(response => {
|
||||
return error;
|
||||
});
|
||||
|
||||
|
||||
export default {
|
||||
user: {
|
||||
login: credentials =>
|
||||
@@ -175,4 +182,4 @@ export default {
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user