The URL of legend icons are not working on layer details page. Like you can see in the image below:

Same is the case with thumbnail on layers listing page. The thumbnail is not loading like in the image below:

The issue in both the cases is that it produces right URL but skips the port (8080) for Geoserver due to which I end up getting error 404. I have changed the GEOSERVER_PUBLIC_PORT variable in local_settings.py to 8080 and have verified that the GEOSERVER_PUBLIC_LOCATION varibale has correct value but it still skips 8080 in that part. Can anyone please tell me where I am going wrong? I couldn't find a clue in the documentation.
The URL of legend icons are not working on layer details page. Like you can see in the image below:

Same is the case with thumbnail on layers listing page. The thumbnail is not loading like in the image below:

The issue in both the cases is that it produces right URL but skips the port (8080) for Geoserver due to which I end up getting error 404. I have changed the GEOSERVER_PUBLIC_PORT variable in local_settings.py to 8080 and have verified that the GEOSERVER_PUBLIC_LOCATION varibale has correct value but it still skips 8080 in that part. Can anyone please tell me where I am going wrong? I couldn't find a clue in the documentation.