Skip to content

Issue in ControllerInterceptor  #37

@shardul3196

Description

@shardul3196

File: com.fynd.extension.middleware.ControllerInterceptor

in preHandle while processing the instance of BaseApplicationController the code tries to map x-application-data header to Application object. The request fails here.

Application has a property cors.

@JsonProperty("cors")
  private Cors cors;

Cors class has a list of domains.

@JsonProperty("domains")
    List<String> Domains;

In the x-application-data header, sent along with the request, cors has a json object inside it.
"cors":{"domains":{}}

Please find the full header below.

{
  "mode": "live",
  "cors": {
    "domains": {}
  },
  "owner": "xxxxxxxxxxx",
  "company_id": 1,
  "_id": "xxxxxxxxxxx",
  "is_active": true,
  "name": "Company",
  "tokens": [
    {
      "token": "xxxxxxxxxxx",
      "created_at": "2022-09-12T08:41:03.656Z"
    },
    {
      "token": "xxxxxxxxxxx",
      "created_by": "xxxxxxxxxxx",
      "created_at": "2023-12-12T07:33:03.902Z"
    }
  ],
  "cache_ttl": -1,
  "domain": {
    "verified": true,
    "is_primary": true,
    "name": "something.de",
    "_id": "xxxxxxxxxxx",
    "is_shortlink": true
  },
  "status": "active",
  "favicon": {
    "secure_url": ""
  },
  "banner": {
    "secure_url": ""
  },
  "internal": false,
  "mobile_logo": {
    "secure_url": ""
  },
  "redirections": [
    {
      "redirect_to": "something.de",
      "_id": "xxxxxxxxxxx",
      "redirect_from": "www.ssss.be",
      "type": "permanent"
    }
  ],
  "description": "",
  "token": "xxxxxxxxxxx",
  "domains": [
    {
      "verified": true,
      "is_primary": true,
      "name": "something.de",
      "_id": "xxxxxxxxxxx",
      "is_shortlink": true
    }
  ],
  "__v": 16,
  "modified_at": "2023-12-12T07:33:03.903Z",
  "logo": {
    "secure_url": "https://cdn.pixelbin.io"
  },
  "channel_type": "website-and-mobile-apps",
  "created_at": "2022-09-12T08:41:03.656Z",
  "auth": {
    "enabled": true
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions