2

When I use file_create_url it return url with http instead of https.

Code Snippet:

$desimg = file_create_url($node->field_image->entity->getFileUri()); 

Due to which i m getting warning like below

Mixed Content: The page at 'https://www.example.com/' was loaded over HTTPS, but requested an insecure image 'http://www.example.com/sites/default/files/test/test_M_01.jpg'. This content should also be served over HTTPS.

I'm missing something?

1

1 Answer 1

1

It could be an issue of reverse proxy, read the below article this may solve your problem

https://www.drupal.org/project/metatag/issues/2842049

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.