Icon URL domain name changes from my jira instance name (naboni-abebe.atlassian.net) to api.atlassian.com

So when I send a get request to get the issue types through a browser:
with this link for example:
the response would be

"issuetype": {
   "id": "10002",
   "description": "A small, distinct piece of work.",
   "iconUrl": "https://naboni-abebe.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10318?size=medium",
   "name": "Task",

but when the response is returned through my custom ui app and i see the console it changes the response to:

issuetype: {
  description: "Functionality or a feature expressed as a user goal."
  iconUrl: "https://api.atlassian.com/ex/jira/983e128e-e19f-40b1-8d6c-edf027ecabe9/rest/api/2/universal_avatar/view/type/issuetype/avatar/10315?size=medium"
  id: "10001"
  name: "Story"

Did you notice that the iconUrl has different urls, one is my jira instance name (naboni-abebe.atlassian.net) and the other is (api.atlassian.com). How can I make the console change back to my jira instance name. Because I’m facing a problem when I try to export a pdf with these icons. The exported pdf does not show the icons, due to cors error.

How do you export the PDF?

Explained here what happens and why this happens :