qumra-engine 2.0.105 → 2.0.107

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.
@@ -28,7 +28,14 @@ const startEngine = async ({ renderApi, mode, getRender, setRender, port = 3000,
28
28
  app.use((0, cookie_parser_1.default)());
29
29
  app.set("view engine", "nunjucks");
30
30
  app.use((0, morgan_1.default)("dev"));
31
- app.use((0, cors_1.default)());
31
+ app.use((0, cors_1.default)({
32
+ origin: ["*"], // السماح فقط للـ origins دول
33
+ // credentials: true, // مهم لو هتستخدم Cookies أو Authorization Headers
34
+ methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"],
35
+ // allowedHeaders: ["Content-Type", "Authorization"],
36
+ }));
37
+ // لازم ترد على preflight OPTIONS request
38
+ app.options("*", (0, cors_1.default)());
32
39
  app.get("/health", (req, res) => {
33
40
  console.log("🚀 Health check OK");
34
41
  res.status(200).send("OK");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qumra-engine",
3
- "version": "2.0.105",
3
+ "version": "2.0.107",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {