0

In my local environment, I have 2 sitecore JSS sites running and I need to make both available over http. one with port 80 and one with port 443.

Example: 
http://abc.com

http://abc.com:443

I added the respective http bindings and I'm able to get JSS response from both sites. The problem is, when I check the media fields, the port number is always removed from the src key and I'm not able to get proper media Urls for the site running in port 443.Its always points to the port 80 site.

"PreviewImage":{
   "value":{
      "src":"http://abc.com/-/media/path.aspx",
      "alt":"image",
      "width":"1500",
      "height":"938"
   }
}

I need to get media urls with port number like http://abc.com:443/-/media/path.aspx I tried with other ports other than 80 and 443, its being properly added to the url but I cannot use other ports as I will go through series of approval to get this port enabled for outside.

Is there any configuration where I can enforce ports to be added to all the media URLS generated.

Version: Sitecore 9.2

| improve this question | | | | |
  • Port 443 is for HTTPS by default. So, it may be that because you are trying to access the media url via http, this is why the 443 is omitted since it is considering the URL as http hence it goes through port 80 – Hishaam Namooya Apr 23 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.