forked from Gitlink/forgeplus-react
修改调用路径后未加跨域参数的问题
This commit is contained in:
parent
a59a8c3693
commit
c3ecbe1f97
|
@ -5,7 +5,7 @@ import cookie from 'react-cookies';
|
||||||
|
|
||||||
let settings=JSON.parse(localStorage.chromesetting);
|
let settings=JSON.parse(localStorage.chromesetting);
|
||||||
let actionUrl = settings.api_urls? settings.api_urls.task :'https://task.osredm.com';
|
let actionUrl = settings.api_urls? settings.api_urls.task :'https://task.osredm.com';
|
||||||
if (window.location.href.indexOf('localhost') < -1) {
|
if (window.location.href.indexOf('localhost') < 0) {
|
||||||
axios.defaults.withCredentials = true;
|
axios.defaults.withCredentials = true;
|
||||||
}
|
}
|
||||||
export const httpUrl = actionUrl;
|
export const httpUrl = actionUrl;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { notification, message } from 'antd';
|
import { notification } from 'antd';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import cookie from 'react-cookies';
|
import cookie from 'react-cookies';
|
||||||
|
|
||||||
|
|
||||||
let settings=JSON.parse(localStorage.chromesetting);
|
let settings = JSON.parse(localStorage.chromesetting);
|
||||||
let actionUrl = settings.api_urls? settings.api_urls.notice :'https://info.osredm.com';
|
let actionUrl = settings.api_urls ? settings.api_urls.notice : 'https://info.osredm.com';
|
||||||
if (window.location.href.indexOf('localhost') < -1) {
|
if (window.location.href.indexOf('localhost')< 0) {
|
||||||
axios.defaults.withCredentials = true;
|
axios.defaults.withCredentials = true;
|
||||||
}
|
}
|
||||||
export const httpUrl = actionUrl;
|
export const httpUrl = actionUrl;
|
||||||
|
|
Loading…
Reference in New Issue