huawei-p20-pro

How to view HardwareImages property over HTTPS connections

Data Team

8/8/2022 2:00 PM

Device Detection Device Data

The HardwareImages 51Degrees property shows a list of images associated with the detected device. The detection results for this property show a set of HTTP links to PNG image files, which show the device from various angles.

huawei-p20-pro
An example of the images you will see for the HardwareImages property. This is a Huawei P20 Pro phone.

Using these images, you can then embed them to display within your internal systems.

One key thing to note with the HardwareImages property is that the links to the images are returned as a HTTP link, rather than HTTPS. For example, the front image of the Huawei P20 Pro is http://images.51degrees.mobi/DI/Front_86775.png.

Since the image link is in HTTP, sometimes it’s not possible to render the image on a HTTPS website. Links can be detected as unsecured, and you may also find that opening the HTTP link shows a security alert warning an attacker may be intercepting your connection.

secure-connection

Luckily there is a quick fix you can do to change the image URLs from HTTP to HTTPS.

Within the data files

The CSV on-premise data files only contain HTTP links for the HardwareImages property. Once downloaded, you can change the HTTP link into HTTPS (by adding an ‘s’) to the specific images you need.

You can do this manually, or you can find and replace all instances of ‘http://’ with ‘https://’; this will change all the links in the data file and should only take a few moments to do.

Alternatively, you can replace all instances of ‘https://images.51degrees.mobi’ with ‘https://51degrees.cachefly.net’; this will then match the URL for our security certificate.

For example, the Huawei P20 Pro front image will change from http://images.51degrees.mobi/DI/Front_86775.png to https://51degrees.cachefly.net/DI/Front_86775.png

Still facing problems?

Our Data Team are working on an update to our service to resolve this. We will update this blog when we have more information.

If you see any issues with the HardwareImages property and viewing images over HTTPS connections, please get in touch and we’d be happy to help.