easy-cms 0.47.3 → 0.48.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.
package/dist/bin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  run
4
- } from "./chunk-73JSCLZP.js";
4
+ } from "./chunk-EGQ4KNYH.js";
5
5
 
6
6
  // src/bin.ts
7
7
  process.exitCode = await run(process.argv.slice(2));
@@ -25,7 +25,8 @@ import { adminHandlerFor } from "@easy-cms/admin";
25
25
  import {
26
26
  createEasyCMS,
27
27
  createRestHandler,
28
- createRootEndpointHandler
28
+ createRootEndpointHandler,
29
+ forwardedClientIp
29
30
  } from "@easy-cms/core";
30
31
  function createStandaloneHandler(cms) {
31
32
  const config = cms.config;
@@ -90,7 +91,7 @@ function header(req, name) {
90
91
  }
91
92
  function clientIpOf(req, trustProxy) {
92
93
  if (trustProxy) {
93
- const forwarded = header(req, "x-forwarded-for")?.split(",")[0]?.trim();
94
+ const forwarded = forwardedClientIp(header(req, "x-forwarded-for"));
94
95
  if (forwarded) return forwarded;
95
96
  }
96
97
  return req.socket.remoteAddress;
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  createStandaloneHandler,
3
3
  run,
4
4
  startServer
5
- } from "./chunk-73JSCLZP.js";
5
+ } from "./chunk-EGQ4KNYH.js";
6
6
  export {
7
7
  createStandaloneHandler,
8
8
  run,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-cms",
3
- "version": "0.47.3",
3
+ "version": "0.48.0",
4
4
  "description": "Command line tool for Easy CMS",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -21,11 +21,11 @@
21
21
  "node": ">=22.12"
22
22
  },
23
23
  "dependencies": {
24
- "@easy-cms/core": "^0.47.3",
25
- "@easy-cms/admin": "^0.47.3"
24
+ "@easy-cms/core": "^0.48.0",
25
+ "@easy-cms/admin": "^0.48.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@easy-cms/db-sqlite": "^0.47.3"
28
+ "@easy-cms/db-sqlite": "^0.48.0"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"