Reverse CORS & Fix Cookie Setting.
This commit is contained in:
@@ -45,10 +45,13 @@ export function JobsCloseExportButton({
|
|||||||
//Check if it's a QBO Setup.
|
//Check if it's a QBO Setup.
|
||||||
let PartnerResponse;
|
let PartnerResponse;
|
||||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||||
PartnerResponse = await axios.post(`/qbo/receivables`, {
|
PartnerResponse = await axios.post(
|
||||||
withCredentials: true,
|
`/qbo/receivables`,
|
||||||
jobIds: [jobId],
|
{
|
||||||
});
|
jobIds: [jobId],
|
||||||
|
},
|
||||||
|
{ withCredentials: true }
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
//Default is QBD
|
//Default is QBD
|
||||||
|
|
||||||
|
|||||||
@@ -37,10 +37,13 @@ export function JobsExportAllButton({
|
|||||||
let PartnerResponse;
|
let PartnerResponse;
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||||
PartnerResponse = await axios.post(`/qbo/receivables`, {
|
PartnerResponse = await axios.post(
|
||||||
withCredentials: true,
|
`/qbo/receivables`,
|
||||||
jobIds: jobIds,
|
{
|
||||||
});
|
jobIds: jobIds,
|
||||||
|
},
|
||||||
|
{ withCredentials: true }
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
let QbXmlResponse;
|
let QbXmlResponse;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -40,10 +40,13 @@ export function PayableExportAll({
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
if (!!loadingCallback) loadingCallback(true);
|
if (!!loadingCallback) loadingCallback(true);
|
||||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||||
PartnerResponse = await axios.post(`/qbo/receivables`, {
|
PartnerResponse = await axios.post(
|
||||||
withCredentials: true,
|
`/qbo/receivables`,
|
||||||
bills: billids,
|
{
|
||||||
});
|
bills: billids,
|
||||||
|
},
|
||||||
|
{ withCredentials: true }
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
let QbXmlResponse;
|
let QbXmlResponse;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -41,10 +41,13 @@ export function PayableExportButton({
|
|||||||
//Check if it's a QBO Setup.
|
//Check if it's a QBO Setup.
|
||||||
let PartnerResponse;
|
let PartnerResponse;
|
||||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||||
PartnerResponse = await axios.post(`/qbo/payables`, {
|
PartnerResponse = await axios.post(
|
||||||
withCredentials: true,
|
`/qbo/payables`,
|
||||||
bills: [billId],
|
{
|
||||||
});
|
bills: [billId],
|
||||||
|
},
|
||||||
|
{ withCredentials: true }
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
//Default is QBD
|
//Default is QBD
|
||||||
|
|
||||||
|
|||||||
@@ -37,10 +37,13 @@ export function PaymentExportButton({
|
|||||||
//Check if it's a QBO Setup.
|
//Check if it's a QBO Setup.
|
||||||
let PartnerResponse;
|
let PartnerResponse;
|
||||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||||
PartnerResponse = await axios.post(`/qbo/payments`, {
|
PartnerResponse = await axios.post(
|
||||||
withCredentials: true,
|
`/qbo/payments`,
|
||||||
payments: [paymentId],
|
{
|
||||||
});
|
payments: [paymentId],
|
||||||
|
},
|
||||||
|
{ withCredentials: true }
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
//Default is QBD
|
//Default is QBD
|
||||||
|
|
||||||
|
|||||||
@@ -35,10 +35,13 @@ export function PaymentsExportAllButton({
|
|||||||
if (!!loadingCallback) loadingCallback(true);
|
if (!!loadingCallback) loadingCallback(true);
|
||||||
let PartnerResponse;
|
let PartnerResponse;
|
||||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||||
PartnerResponse = await axios.post(`/qbo/payments`, {
|
PartnerResponse = await axios.post(
|
||||||
withCredentials: true,
|
`/qbo/payments`,
|
||||||
payments: paymentIds,
|
{
|
||||||
});
|
payments: paymentIds,
|
||||||
|
},
|
||||||
|
{ withCredentials: true }
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
let QbXmlResponse;
|
let QbXmlResponse;
|
||||||
try {
|
try {
|
||||||
|
|||||||
17
server.js
17
server.js
@@ -46,14 +46,15 @@ app.use(bodyParser.json({ limit: "50mb" }));
|
|||||||
app.use(bodyParser.urlencoded({ limit: "50mb", extended: true }));
|
app.use(bodyParser.urlencoded({ limit: "50mb", extended: true }));
|
||||||
//app.use(enforce.HTTPS({ trustProtoHeader: true }));
|
//app.use(enforce.HTTPS({ trustProtoHeader: true }));
|
||||||
app.use(
|
app.use(
|
||||||
cors({
|
cors()
|
||||||
credentials: true,
|
// {
|
||||||
origin: [
|
// credentials: true,
|
||||||
"https://test.imex.online",
|
// origin: [
|
||||||
"http://localhost:3000",
|
// "https://test.imex.online",
|
||||||
"https://imex.online",
|
// "http://localhost:3000",
|
||||||
],
|
// "https://imex.online",
|
||||||
})
|
// ],
|
||||||
|
// }
|
||||||
);
|
);
|
||||||
|
|
||||||
//Email Based Paths.
|
//Email Based Paths.
|
||||||
|
|||||||
Reference in New Issue
Block a user