Compare commits
2 Commits
0bd7642730
...
0a982eded7
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a982eded7 | |||
| 52762281f3 |
+8
-1
@@ -2,11 +2,17 @@ import axios from "axios";
|
|||||||
import { fetchAnswerFailure } from "../actions/answer";
|
import { fetchAnswerFailure } from "../actions/answer";
|
||||||
import setAuthorizationHeader from "./setAuthorizationHeader";
|
import setAuthorizationHeader from "./setAuthorizationHeader";
|
||||||
import Router from 'next/router';
|
import Router from 'next/router';
|
||||||
|
|
||||||
|
var https = require('https');
|
||||||
|
|
||||||
//axios.defaults.headers.common = { 'X-Requested-With': 'XMLHttpRequest' }
|
//axios.defaults.headers.common = { 'X-Requested-With': 'XMLHttpRequest' }
|
||||||
axios.defaults.baseURL = (process.env.NODE_ENV !== 'production') ?
|
axios.defaults.baseURL = (process.env.NODE_ENV !== 'production') ?
|
||||||
'http://localhost/app_dev.php/' :
|
'http://localhost/app_dev.php/' :
|
||||||
process.env.SERVER_URL;
|
process.env.SERVER_URL;
|
||||||
|
|
||||||
|
const httpsAgent = new https.Agent({ rejectUnauthorized: false });
|
||||||
|
axios.defaults.httpsAgent = httpsAgent;
|
||||||
|
|
||||||
axios.interceptors.response.use(response => {
|
axios.interceptors.response.use(response => {
|
||||||
return response;
|
return response;
|
||||||
}, error => {
|
}, error => {
|
||||||
@@ -18,6 +24,7 @@ axios.interceptors.response.use(response => {
|
|||||||
return error;
|
return error;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
user: {
|
user: {
|
||||||
login: credentials =>
|
login: credentials =>
|
||||||
@@ -175,4 +182,4 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@
|
|||||||
"@material-ui/lab": "^4.0.0-alpha.56",
|
"@material-ui/lab": "^4.0.0-alpha.56",
|
||||||
"@ostai/next-css": "^1.0.2",
|
"@ostai/next-css": "^1.0.2",
|
||||||
"autosuggest-highlight": "^3.1.1",
|
"autosuggest-highlight": "^3.1.1",
|
||||||
"axios": "^0.22.0",
|
"axios": "^0.23.0",
|
||||||
"connect-mongo": "^2.0.1",
|
"connect-mongo": "^2.0.1",
|
||||||
"cross-env": "^5.2.0",
|
"cross-env": "^5.2.0",
|
||||||
"css-loader": "^3.2.0",
|
"css-loader": "^3.2.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user