@vicacha-devs/strapi-plugin-inbox 1.1.1 → 1.1.2

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.
@@ -1613,9 +1613,7 @@ function normalizeSubmitPayload(rawBody) {
1613
1613
  }
1614
1614
  function resolveClientIp(ctx) {
1615
1615
  const directIp = ctx.ip || ctx.request.ip;
1616
- if (directIp && directIp.trim()) return directIp.trim();
1617
- const forwarded = ctx.request.headers?.["x-forwarded-for"]?.split(",")[0]?.trim();
1618
- return forwarded || "127.0.0.1";
1616
+ return directIp && directIp.trim() ? directIp.trim() : "127.0.0.1";
1619
1617
  }
1620
1618
  function isAuthenticatedAdminContext(ctx) {
1621
1619
  const state = ctx.state;
@@ -1611,9 +1611,7 @@ function normalizeSubmitPayload(rawBody) {
1611
1611
  }
1612
1612
  function resolveClientIp(ctx) {
1613
1613
  const directIp = ctx.ip || ctx.request.ip;
1614
- if (directIp && directIp.trim()) return directIp.trim();
1615
- const forwarded = ctx.request.headers?.["x-forwarded-for"]?.split(",")[0]?.trim();
1616
- return forwarded || "127.0.0.1";
1614
+ return directIp && directIp.trim() ? directIp.trim() : "127.0.0.1";
1617
1615
  }
1618
1616
  function isAuthenticatedAdminContext(ctx) {
1619
1617
  const state = ctx.state;
@@ -1,5 +1,6 @@
1
1
  import { Core } from '@strapi/strapi';
2
2
  import { ControllerCtx } from './inboxController';
3
+ export declare function resolveClientIp(ctx: ControllerCtx): string;
3
4
  export declare const createFormHandlers: (strapi: Core.Strapi) => {
4
5
  getSettings(ctx: ControllerCtx): Promise<void>;
5
6
  updateSettings(ctx: ControllerCtx): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vicacha-devs/strapi-plugin-inbox",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Generic Strapi v5 Visual Form Builder, Service-Desk Casework Inbox, Double Opt-In Subscriber Lists & Site-Wide Alert Banners (forked & extended from devCluna/strapi-plugin-form-builder-cms)",
5
5
  "keywords": [
6
6
  "alert-banners",