qumra-engine 2.0.111 → 2.0.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -60,7 +60,7 @@ const prepareDataMiddleware = (req, res, next) => {
|
|
|
60
60
|
// axios لا يستخدم .ok ولا .json()
|
|
61
61
|
// البيانات موجودة مباشرة في engineResponse.data
|
|
62
62
|
const data = engineResponse.data?.data;
|
|
63
|
-
if (!res.locals.isIframe) {
|
|
63
|
+
if (!res.locals.isIframe && !req.session?.devMode) {
|
|
64
64
|
const backendUrl = data.globals?.app?.url;
|
|
65
65
|
const expectedHost = typeof backendUrl === "string"
|
|
66
66
|
? new URL(backendUrl).host
|
package/dist/middleware.js
CHANGED
|
@@ -25,12 +25,12 @@ const cors_1 = __importDefault(require("cors"));
|
|
|
25
25
|
const startEngine = async ({ renderApi, mode, getRender, setRender, port = 3000, themesRepo, themeId = null, currentApp, market, }) => {
|
|
26
26
|
try {
|
|
27
27
|
const app = (0, express_1.default)();
|
|
28
|
+
app.use((0, cookie_parser_1.default)());
|
|
29
|
+
app.use((0, morgan_1.default)("dev"));
|
|
28
30
|
app.use((0, cors_1.default)({
|
|
29
31
|
origin: "*",
|
|
30
32
|
}));
|
|
31
|
-
app.use((0, cookie_parser_1.default)());
|
|
32
33
|
app.set("view engine", "nunjucks");
|
|
33
|
-
app.use((0, morgan_1.default)("dev"));
|
|
34
34
|
// لازم ترد على preflight OPTIONS request
|
|
35
35
|
// app.options("*", cors());
|
|
36
36
|
app.get("/health", (req, res) => {
|