Updated cors middleware to allow chrome and edge to work with fd app

This commit is contained in:
MattLeo 2025-12-10 09:43:44 -06:00
parent 3c0abb05c7
commit 3044ad6783
6 changed files with 14 additions and 36 deletions

View File

@ -1 +1 @@
{"fd_cli_101_101_migrate_oauth_status":true,"report_hash":"68e133744a798746add1942f3d4d4e54eafae2ea71b77bc6f83040457d6ee569"}
{"fd_cli_101_101_migrate_oauth_status":true,"report_hash":"bf41fc78724de798be4bb5d0dab2fb2f46f608766fa4a7d68b852868cbf48b97","fd_cli_101_101_modules":{"fd_cli_101_101_system_settings":{"currentHost":{"endpoint_urls":{"freshdesk":"https://jvis.freshdesk.com/"},"subscribed_modules":["support_ticket"],"org_domain":"jvis","product_types":{"freshdesk":"DEFAULT"}}},"fd_cli_101_101_custom_iparams":{},"isLocalAppInstalled":true,"isLocalAppEnabled":true}}

Binary file not shown.

View File

@ -11,8 +11,8 @@
"type": "custom-js-lint"
},
{
"severity": 2,
"value": "app\\scripts\\app.js::59: 'data' is defined but never used.",
"severity": 1,
"value": "app\\scripts\\app.js::60: Empty block statement.",
"type": "lint"
}
],
@ -726,30 +726,5 @@
"hash": "b15f7d260a11f1649b19a5f5d29df6f8aaa4bc2e"
}
},
"coverageSummary": {
"lines": {
"total": 30,
"covered": 24,
"skipped": 0,
"pct": 80
},
"statements": {
"total": 30,
"covered": 24,
"skipped": 0,
"pct": 80
},
"functions": {
"total": 9,
"covered": 6,
"skipped": 0,
"pct": 66.66
},
"branches": {
"total": 8,
"covered": 6,
"skipped": 0,
"pct": 75
}
}
"coverageSummary": {}
}

View File

@ -56,7 +56,8 @@ document.addEventListener('DOMContentLoaded', function () {
id: "cf_ka_number",
value: currentKA
})
.then(function(_data) {
.then(function(data) {
if (data) {}
return client.interface.trigger('showNotify', {
type: 'success',
message: currentKA + ' attached to ticket'

View File

@ -1,5 +0,0 @@
{
"app": {
"name": "Cram-A-Lot Knowledge Base"
}
}

View File

@ -36,7 +36,14 @@ const path = require('path');
const fs = require('fs');
const PORT = 9000;
app.use(cors())
app.use(cors({
origin: ['httos://jvis.freshdesk.com', 'https://kb.jv.com'],
credentials: true
}));
app.use((req, res, next) => {
res.setHeader('Access-Control-Allow-Private-Network', 'true');
next();
});
app.use(express.json());
app.use(express.static(path.join(__dirname, 'frontend/dist')));