@dnax/core 0.17.6 → 0.18.0

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.
Files changed (2) hide show
  1. package/app/hono.ts +20 -19
  2. package/package.json +1 -1
package/app/hono.ts CHANGED
@@ -44,25 +44,6 @@ const app = new Hono();
44
44
  const API_PATH = "/api";
45
45
 
46
46
  function HonoInstance(): typeof app {
47
- // Public assets
48
- app.get(
49
- "/assets/*",
50
- serveStatic({
51
- root: "uploads",
52
- //rewriteRequestPath: (path) => path?.replace(/^\/assets/, ""),
53
- })
54
- );
55
-
56
- app.use(csrf());
57
-
58
- app.use(
59
- ipRestriction(getConnInfo, {
60
- allowList: Cfg?.server?.whiteListIps || [],
61
- denyList: Cfg?.server?.blackListIps || [],
62
- // blackList: Cfg.server?.ipBlackList || [],
63
- })
64
- );
65
- app.use(secureHeaders());
66
47
  app.use(
67
48
  cors({
68
49
  origin: Cfg.server?.cors?.origin || "*",
@@ -89,6 +70,26 @@ function HonoInstance(): typeof app {
89
70
  ],
90
71
  })
91
72
  );
73
+ // Public assets
74
+ app.get(
75
+ "/assets/*",
76
+ serveStatic({
77
+ root: "uploads",
78
+ //rewriteRequestPath: (path) => path?.replace(/^\/assets/, ""),
79
+ })
80
+ );
81
+
82
+ app.use(csrf());
83
+
84
+ app.use(
85
+ ipRestriction(getConnInfo, {
86
+ allowList: Cfg?.server?.whiteListIps || [],
87
+ denyList: Cfg?.server?.blackListIps || [],
88
+ // blackList: Cfg.server?.ipBlackList || [],
89
+ })
90
+ );
91
+ app.use(secureHeaders());
92
+
92
93
  //eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoibm9tIiwiaWF0IjoxNzE3Nzc0MDQzLCJleHAiOjE3MTc3NzQxMDN9.Ud4-0y8pa4SMIcSn8PU1A-sjC-hT4ZVe_u3AdChyIJU
93
94
  // Middlewares Injection
94
95
  app.use(async (c, next) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.17.6",
3
+ "version": "0.18.0",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {